Displaying 2 results from an estimated 2 matches for "tryfoldmemoryoperand".
2010 Jul 20
2
[LLVMdev] Spilling multi-word virtual registers
...t fairly straight-forward. They generate three
memory instructions, calling TargetRegisterInfo::getSubReg() to get the
sub-register operand for each of them.
So it was a rude awakening when a test program resulted in a _virtual_
register being passed into loadRegFromStackSlot() (via
LiveIntervals::tryFoldMemoryOperand() if it matters). Obviously I need
to make some changes. But what?
A couple options immediately come to mind:
1. Generate INSERT_SUBREG/EXTRACT_SUBREG machine instructions in
loadRegFromStackSlot() and storeRegToStackSlot() to handle virtual
registers. Will this work? Is it safe to create additio...
2010 Jul 20
0
[LLVMdev] Spilling multi-word virtual registers
...y generate three
> memory instructions, calling TargetRegisterInfo::getSubReg() to get the
> sub-register operand for each of them.
>
> So it was a rude awakening when a test program resulted in a _virtual_
> register being passed into loadRegFromStackSlot() (via
> LiveIntervals::tryFoldMemoryOperand() if it matters). Obviously I need
> to make some changes. But what?
This is quite simple to handle. A register MachineOperand has a subreg field for this purpose. It is used to pick out subregisters of a virtual register.
For a physical register:
MO.setReg(TRI.getSubReg(Reg, SubIdx));
For...