diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index 9a0fbc29da0..f7373bea86b 100644 --- a/lib/CodeGen/MachineLICM.cpp +++ b/lib/CodeGen/MachineLICM.cpp @@ -56,9 +56,6 @@ namespace { // State that is updated as we process loops bool Changed; // True if a loop is changed. MachineLoop *CurLoop; // The current loop we are working on. - - // Map the def of a virtual register to the machine instruction. - IndexedMap VRegDefs; public: static char ID; // Pass identification, replacement for typeid MachineLICM() : MachineFunctionPass((intptr_t)&ID) {} @@ -92,11 +89,6 @@ namespace { HoistRegion(DT->getNode(L->getHeader())); } - /// MapVirtualRegisterDefs - Create a map of which machine instruction - /// defines a virtual register. - /// - void MapVirtualRegisterDefs(); - /// IsInSubLoop - A little predicate that returns true if the specified /// basic block is in a subloop of the current one, not the current one /// itself. @@ -192,8 +184,6 @@ bool MachineLICM::runOnMachineFunction(MachineFunction &MF) { LI = &getAnalysis(); DT = &getAnalysis(); - MapVirtualRegisterDefs(); - for (MachineLoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) { CurLoop = *I; @@ -208,31 +198,6 @@ bool MachineLICM::runOnMachineFunction(MachineFunction &MF) { return Changed; } -/// MapVirtualRegisterDefs - Create a map of which machine instruction defines a -/// virtual register. -/// -void MachineLICM::MapVirtualRegisterDefs() { - for (MachineFunction::const_iterator - I = CurMF->begin(), E = CurMF->end(); I != E; ++I) { - const MachineBasicBlock &MBB = *I; - - for (MachineBasicBlock::const_iterator - II = MBB.begin(), IE = MBB.end(); II != IE; ++II) { - const MachineInstr &MI = *II; - - for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI.getOperand(i); - - if (MO.isRegister() && MO.isDef() && - MRegisterInfo::isVirtualRegister(MO.getReg())) { - VRegDefs.grow(MO.getReg()); - VRegDefs[MO.getReg()] = &MI; - } - } - } - } -} - /// HoistRegion - Walk the specified region of the CFG (defined by all blocks /// dominated by the specified block, and that are in the current loop) in depth /// first order w.r.t the DominatorTree. This allows us to visit definitions