diff options
| author | Dan Gohman <gohman@apple.com> | 2008-07-09 19:55:19 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-07-09 19:55:19 +0000 |
| commit | 8ab08642eea594c8f247c2feda17136335300f7d (patch) | |
| tree | 927b6c29d87b61cb353bf30f6d6f2b892b8cb28c /llvm/lib/CodeGen | |
| parent | 8a950730980e4362ecc6fb14d38599e3cab314f7 (diff) | |
| download | bcm5719-llvm-8ab08642eea594c8f247c2feda17136335300f7d.tar.gz bcm5719-llvm-8ab08642eea594c8f247c2feda17136335300f7d.zip | |
RegAllocLocal has a TargetInstrInfo data member. Use it instead
of having local variables duplicate it.
llvm-svn: 53346
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocLocal.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp index 7acf982bdf8..c59d3b8477a 100644 --- a/llvm/lib/CodeGen/RegAllocLocal.cpp +++ b/llvm/lib/CodeGen/RegAllocLocal.cpp @@ -291,8 +291,6 @@ void RALocal::spillVirtReg(MachineBasicBlock &MBB, DOUT << " Spilling register " << TRI->getName(PhysReg) << " containing %reg" << VirtReg; - const TargetInstrInfo* TII = MBB.getParent()->getTarget().getInstrInfo(); - if (!isVirtRegModified(VirtReg)) { DOUT << " which has not been modified, so no store necessary!"; std::pair<MachineInstr*, unsigned> &LastUse = getVirtRegLastUse(VirtReg); @@ -507,7 +505,6 @@ MachineInstr *RALocal::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI, << TRI->getName(PhysReg) << "\n"; // Add move instruction(s) - const TargetInstrInfo* TII = MBB.getParent()->getTarget().getInstrInfo(); TII->loadRegFromStackSlot(MBB, MI, PhysReg, FrameIndex, RC); ++NumLoads; // Update statistics @@ -564,7 +561,6 @@ static bool precedes(MachineBasicBlock::iterator A, void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) { // loop over each instruction MachineBasicBlock::iterator MII = MBB.begin(); - const TargetInstrInfo &TII = *TM->getInstrInfo(); DEBUG(const BasicBlock *LBB = MBB.getBasicBlock(); if (LBB) DOUT << "\nStarting RegAlloc of BB: " << LBB->getName()); @@ -882,7 +878,7 @@ void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) { // Finally, if this is a noop copy instruction, zap it. unsigned SrcReg, DstReg; - if (TII.isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg) + if (TII->isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg) MBB.erase(MI); } |

