I would like to access the AsmPrinter MachineFunctionPass during compilation in order to do alternative dumping of instructions, instead of using MI->dump(), which can get a bit messy.
Is there any way to access this object or the assembler strings? It seems that even these strings / methods are not available through any static methods. Does it exist during the whole compilation or is it created by PassManager in the end?
I have a question regarding this method, as i have discovered a case where it seems very far from 'strict'.
I had two MI's, A and B, where A is !isSafeToMove():
TwoAddress pass changes the order to
, as it reschedules the LastKill MI (B).
Is this a bug in TwoAdress, or is it the case that isSafeToMove() is weaker than isSchedulingBoundary() so that these indirect violations are expected and accepted in TwoAddress and elsewhere?
The latter. The 2-addr pass is free to move B.