[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp AlphaRegisterInfo.h
Evan Cheng
evan.cheng at apple.com
Tue Mar 20 01:08:03 PDT 2007
Changes in directory llvm/lib/Target/Alpha:
AlphaRegisterInfo.cpp updated: 1.63 -> 1.64
AlphaRegisterInfo.h updated: 1.22 -> 1.23
---
Log message:
Added MRegisterInfo hook to re-materialize an instruction.
---
Diffs of the changes: (+12 -0)
AlphaRegisterInfo.cpp | 9 +++++++++
AlphaRegisterInfo.h | 3 +++
2 files changed, 12 insertions(+)
Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.63 llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.64
--- llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.63 Tue Feb 27 18:18:31 2007
+++ llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp Tue Mar 20 03:07:46 2007
@@ -155,6 +155,15 @@
}
}
+void AlphaRegisterInfo::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* AlphaRegisterInfo::getCalleeSavedRegs() const {
static const unsigned CalleeSavedRegs[] = {
Alpha::R9, Alpha::R10,
Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.h
diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.h:1.22 llvm/lib/Target/Alpha/AlphaRegisterInfo.h:1.23
--- llvm/lib/Target/Alpha/AlphaRegisterInfo.h:1.22 Tue Feb 27 18:18:31 2007
+++ llvm/lib/Target/Alpha/AlphaRegisterInfo.h Tue Mar 20 03:07:46 2007
@@ -45,6 +45,9 @@
unsigned DestReg, unsigned SrcReg,
const TargetRegisterClass *RC) const;
+ void reMaterialize(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
+ unsigned DestReg, const MachineInstr *Orig) const;
+
const unsigned *getCalleeSavedRegs() const;
const TargetRegisterClass* const* getCalleeSavedRegClasses() const;
More information about the llvm-commits
mailing list