Some machine operands have their values encoded as immediates and are thus printed as immediates, for example:
dead renamable $r2, $cpsr = tEOR killed renamable $r2, renamable $r1, 14, $noreg t2Bcc %bb.4, 0, killed $cpsr
In this example, 14 is a condition code that means that the EOR instruction is not conditionally executed (it is "always executed"). The 0 on the next conditional branch instruction represents the equal condition code. The problem is that these constants make the MIR difficult to read (for a human), so here we propose to annotate MachineOperands with an annotation/comment:
dead renamable $r2, $cpsr = tEOR killed renamable $r2, renamable $r1, 14 [always], $noreg t2Bcc %bb.4, 0 [equal], killed $cpsr
As it is a comment, the MI lexer/parser completely ignores it. The benefit is that this keeps the change in the lexer extremely minimal and no target specific parsing needs to be done. The changes on the MIPrinter side are also minimal, as targets hooks are used to create the machine operand comments.
Is this still needed in the common TargetInstrInfo?