Putting this up for early review to get some of the bikeshedding done while I am finishing this up:
We sometimes want to test a specific codegen API rather than a whole pass.
This adds a special pass to llc that features a minimalistic scripting language to
call some predefined API functions so we can test the API with the usual lit+FileCheck tools.
The first implementation allows moving an instruction to a different
place and updating liveness information with the handleMove() API. This
obsoletes the previously existing unittest for this.
Without reading the source of the rest of this patch, I find it hard to guess exactly what this is testing.
Maybe before committing, also some documentation should be written on how to use this new feature?
I'm not sure where the best place would be for that documentation to live. Maybe http://llvm.org/docs/MIRLangRef.html?