Displaying 1 result from an estimated 1 matches for "add_areg".
Did you mean:
add_adev
2014 Oct 10
2
[LLVMdev] eliminateFrameIndex
...nd. The method looks like this:
// frame pointer is in reg of class mytarget::ARegsRegClass
unsigned ScratchReg = MF.getRegInfo().createVirtualRegister(&mytarget::ARegsRegClass);
const TargetInstrInfo &TII = *MF.getTarget().getInstrInfo();
BuildMI(*MI.getParent(), II, dl, TII.get(mytarget::ADD_AReg), ScratchReg).addReg(FramePtr).addImm(Offset);
// Update the original instruction to use the scratch register.
MI.getOperand(FIOperandNum).ChangeToRegister(ScratchReg, false);
But for the test case
int foo(void)
{
int a = 43;
return(41);
}
I get the error message "Remaining virtual r...