[LLVMdev] implicit register usage

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Feb 20 13:22:11 PST 2013


On Feb 20, 2013, at 11:44 AM, Jim Grosbach <grosbach at apple.com> wrote:

> I'm not sure. It certainly seems reasonable to me that the building could/should set default Define flags on operands based on the MCInstrDesc. Dunno why it doesn't.

Once you move beyond the fixed operands, it can't be determined automatically if the added register should be a use or a def.

But I think it would be convenient to add addUse() and addDef() methods to MachineInstrBuilder, instead of requiring the tedious addReg(..., RegState::Define).

/jakob




More information about the llvm-dev mailing list