[LLVMdev] Adding MachineOperands that are not part of MCInstrDesc.

Jonas Paulsson jonas.paulsson at ericsson.com
Wed Apr 22 07:48:54 PDT 2015


Hi,

I wonder if it is okay to add an operand that is not part of MCInstrDesc 
to an MI after isel?

There are things going on like instruction combining, rematerialization 
etc, which may call MI with TI->get(opcode). If an MI would get replaced 
with a new instance of itself in this way, any previously added operands 
would get lost, as they are not part of the MCInstrDesc.

RegAlloc, does this, so I assume it is safe to add operands post-ra. I 
wonder if it also safe to add phys-reg defs/uses directly after DAG 
isel? Would it be a bug if they would be removed by a transformation?

Thanks,

Jonas Paulsson




More information about the llvm-dev mailing list