aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocBigBlock.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-01-07 01:35:56 +0000
committerOwen Anderson <resistor@mac.com>2008-01-07 01:35:56 +0000
commit6425f8be7263e625c2d7484eb2fb8f6643824f49 (patch)
tree39fc549cc179067501294dc83649ac50f4c74044 /lib/CodeGen/RegAllocBigBlock.cpp
parent43dbe05279b753aabda571d9c83eaeb36987001a (diff)
Update CodeGen for MRegisterInfo --> TargetInstrInfo changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45673 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocBigBlock.cpp')
-rw-r--r--lib/CodeGen/RegAllocBigBlock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/RegAllocBigBlock.cpp b/lib/CodeGen/RegAllocBigBlock.cpp
index 4d34a9ac6d..fa0539ed45 100644
--- a/lib/CodeGen/RegAllocBigBlock.cpp
+++ b/lib/CodeGen/RegAllocBigBlock.cpp
@@ -505,6 +505,7 @@ unsigned RABigBlock::chooseReg(MachineBasicBlock &MBB, MachineInstr *I,
MachineInstr *RABigBlock::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI,
unsigned OpNum) {
unsigned VirtReg = MI->getOperand(OpNum).getReg();
+ const TargetInstrInfo* TII = MBB.getParent()->getTarget().getInstrInfo();
// If the virtual register is already available in a physical register,
// just update the instruction and return.
@@ -525,7 +526,7 @@ MachineInstr *RABigBlock::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI
// try to fold the spill into the instruction
SmallVector<unsigned, 2> Ops;
Ops.push_back(OpNum);
- if(MachineInstr* FMI = RegInfo->foldMemoryOperand(MI, Ops, FrameIndex)) {
+ if(MachineInstr* FMI = TII->foldMemoryOperand(MI, Ops, FrameIndex)) {
++NumFolded;
// Since we changed the address of MI, make sure to update live variables
// to know that the new instruction has the properties of the old one.
@@ -545,7 +546,6 @@ MachineInstr *RABigBlock::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI
<< RegInfo->getName(PhysReg) << "\n";
// Add move instruction(s)
- const TargetInstrInfo* TII = MBB.getParent()->getTarget().getInstrInfo();
TII->loadRegFromStackSlot(MBB, MI, PhysReg, FrameIndex, RC);
++NumLoads; // Update statistics