TL;DR the plugin interface produces serialized thrift objects containing integers derived from addresses; this results in repeated runs producing differing output, and that's unpleasant. This is easy to test and easy to fix.
Longer: The plugin interface is really nice, and I'd like to use it for more things. One problem with it, is that from run-to-run, the data given to the plugin can and does change, b/c there are "ids" (e.g. "t_type_id") that are derived from pointer-addresses inside the compiler. It'd be nice to replace those with generated integers starting at a fixed base. In short, instead of random integers scattered thru the plugin, we'd get (say) numbers starting at 1000000 and consecutively increasing. Each different kind of ID would start at that same base, and the assignment would be based on how the "converter" from internal types to thrift types walked the data-structure. Which should be deterministic. So that would give a determinsitic output to the plugin.
This is easy to unit-test: just use /bin/cat as a plugin and compare subsequent runs.
I'll write a unit-test and then a patch.