summaryrefslogtreecommitdiff
path: root/lib/Target/Alpha/AlphaRegisterInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-03-20 08:09:38 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-03-20 08:09:38 +0000
commitbf2c8b3c96f5c885095a10b0fcb29438f92d73c2 (patch)
treee29fe6ae443de3ff4bc386753587aa3654a67ba8 /lib/Target/Alpha/AlphaRegisterInfo.cpp
parenta16b7cb1d3a482a28bc8f73433f0034d8d8673d7 (diff)
downloadllvm-bf2c8b3c96f5c885095a10b0fcb29438f92d73c2.tar.gz
llvm-bf2c8b3c96f5c885095a10b0fcb29438f92d73c2.tar.bz2
llvm-bf2c8b3c96f5c885095a10b0fcb29438f92d73c2.tar.xz
Added MRegisterInfo hook to re-materialize an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaRegisterInfo.cpp')
-rw-r--r--lib/Target/Alpha/AlphaRegisterInfo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/Alpha/AlphaRegisterInfo.cpp b/lib/Target/Alpha/AlphaRegisterInfo.cpp
index aea7c6da51..8dd8b1769a 100644
--- a/lib/Target/Alpha/AlphaRegisterInfo.cpp
+++ b/lib/Target/Alpha/AlphaRegisterInfo.cpp
@@ -155,6 +155,15 @@ void AlphaRegisterInfo::copyRegToReg(MachineBasicBlock &MBB,
}
}
+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,