[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp PPCRegisterInfo.h
Evan Cheng
evan.cheng at apple.com
Tue Mar 20 01:08:47 PDT 2007
Changes in directory llvm/lib/Target/PowerPC:
PPCRegisterInfo.cpp updated: 1.116 -> 1.117
PPCRegisterInfo.h updated: 1.33 -> 1.34
---
Log message:
Added MRegisterInfo hook to re-materialize an instruction.
---
Diffs of the changes: (+12 -0)
PPCRegisterInfo.cpp | 9 +++++++++
PPCRegisterInfo.h | 3 +++
2 files changed, 12 insertions(+)
Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.116 llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.117
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.116 Tue Mar 6 04:05:14 2007
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Tue Mar 20 03:08:30 2007
@@ -239,6 +239,15 @@
}
}
+void PPCRegisterInfo::reMaterialize(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator I,
+ unsigned DestReg,
+ const MachineInstr *Orig) const {
+ MachineInstr *MI = Orig->clone();
+ MI->getOperand(0).setReg(DestReg);
+ MBB.insert(I, MI);
+}
+
const unsigned* PPCRegisterInfo::getCalleeSavedRegs() const {
// 32-bit Darwin calling convention.
static const unsigned Darwin32_CalleeSavedRegs[] = {
Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.h
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.33 llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.34
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.33 Tue Mar 6 04:05:14 2007
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.h Tue Mar 20 03:08:30 2007
@@ -49,6 +49,9 @@
unsigned DestReg, unsigned SrcReg,
const TargetRegisterClass *RC) const;
+ void reMaterialize(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
+ unsigned DestReg, const MachineInstr *Orig) const;
+
/// foldMemoryOperand - PowerPC (like most RISC's) can only fold spills into
/// copy instructions, turning them into load/store instructions.
virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum,
More information about the llvm-commits
mailing list