[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu May 4 10:52:42 PDT 2006
Changes in directory llvm/lib/Target/Alpha:
AlphaRegisterInfo.cpp updated: 1.42 -> 1.43
---
Log message:
Move some methods out of MachineInstr into MachineOperand
---
Diffs of the changes: (+4 -5)
AlphaRegisterInfo.cpp | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.42 llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.43
--- llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.42 Thu May 4 12:21:19 2006
+++ llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp Thu May 4 12:52:23 2006
@@ -216,7 +216,7 @@
int FrameIndex = MI.getOperand(i).getFrameIndex();
// Add the base register of R30 (SP) or R15 (FP).
- MI.SetMachineOperandReg(i + 1, FP ? Alpha::R15 : Alpha::R30);
+ MI.getOperand(i + 1).ChangeToRegister(FP ? Alpha::R15 : Alpha::R30);
// Now add the frame object offset to the offset from the virtual frame index.
int Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex);
@@ -233,15 +233,14 @@
//so in this case, we need to use a temporary register, and move the original
//inst off the SP/FP
//fix up the old:
- MI.SetMachineOperandReg(i + 1, Alpha::R28);
- MI.SetMachineOperandConst(i, MachineOperand::MO_Immediate,
- getLower16(Offset));
+ MI.getOperand(i + 1).ChangeToRegister(Alpha::R28);
+ MI.getOperand(i).ChangeToImmediate(getLower16(Offset));
//insert the new
MachineInstr* nMI=BuildMI(Alpha::LDAH, 2, Alpha::R28)
.addImm(getUpper16(Offset)).addReg(FP ? Alpha::R15 : Alpha::R30);
MBB.insert(II, nMI);
} else {
- MI.SetMachineOperandConst(i, MachineOperand::MO_Immediate, Offset);
+ MI.getOperand(i).ChangeToImmediate(Offset);
}
}
More information about the llvm-commits
mailing list