[llvm-commits] [llvm] r53347 - /llvm/trunk/lib/CodeGen/RegAllocSimple.cpp
Dan Gohman
gohman at apple.com
Wed Jul 9 12:56:01 PDT 2008
Author: djg
Date: Wed Jul 9 14:56:01 2008
New Revision: 53347
URL: http://llvm.org/viewvc/llvm-project?rev=53347&view=rev
Log:
Give RegAllocSimple a TargetInstrInfo member to keep it consistent
with RegAllocLocal.
Modified:
llvm/trunk/lib/CodeGen/RegAllocSimple.cpp
Modified: llvm/trunk/lib/CodeGen/RegAllocSimple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocSimple.cpp?rev=53347&r1=53346&r2=53347&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocSimple.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocSimple.cpp Wed Jul 9 14:56:01 2008
@@ -46,6 +46,7 @@
MachineFunction *MF;
const TargetMachine *TM;
const TargetRegisterInfo *TRI;
+ const TargetInstrInfo *TII;
// StackSlotForVirtReg - Maps SSA Regs => frame index on the stack where
// these values are spilled
@@ -144,7 +145,6 @@
// Add move instruction(s)
++NumLoads;
- const TargetInstrInfo* TII = MBB.getParent()->getTarget().getInstrInfo();
TII->loadRegFromStackSlot(MBB, I, PhysReg, FrameIdx, RC);
return PhysReg;
}
@@ -153,7 +153,6 @@
MachineBasicBlock::iterator I,
unsigned VirtReg, unsigned PhysReg) {
const TargetRegisterClass* RC = MF->getRegInfo().getRegClass(VirtReg);
- const TargetInstrInfo* TII = MBB.getParent()->getTarget().getInstrInfo();
int FrameIdx = getStackSpaceFor(VirtReg, RC);
@@ -240,6 +239,7 @@
MF = &Fn;
TM = &MF->getTarget();
TRI = TM->getRegisterInfo();
+ TII = TM->getInstrInfo();
// Loop over all of the basic blocks, eliminating virtual register references
for (MachineFunction::iterator MBB = Fn.begin(), MBBe = Fn.end();
More information about the llvm-commits
mailing list