Added MRegisterInfo hook to re-materialize an instruction.
[oota-llvm.git] / lib / Target / PowerPC / PPCRegisterInfo.cpp
index 1029babe99e86a06de6ec43174bef5a22023ce87..0b9602be36e9915a1d4c71029da86b67f7ffd7d2 100644 (file)
@@ -239,6 +239,15 @@ void PPCRegisterInfo::copyRegToReg(MachineBasicBlock &MBB,
   }
 }
 
+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[] = {