[llvm-commits] [llvm] r45496 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp

Bill Wendling isanbard at gmail.com
Wed Jan 2 12:47:38 PST 2008


Author: void
Date: Wed Jan  2 14:47:37 2008
New Revision: 45496

URL: http://llvm.org/viewvc/llvm-project?rev=45496&view=rev
Log:
Remove dead code.

Modified:
    llvm/trunk/lib/CodeGen/MachineLICM.cpp

Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=45496&r1=45495&r2=45496&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Wed Jan  2 14:47:37 2008
@@ -56,9 +56,6 @@
     // 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<const MachineInstr*, VirtReg2IndexFunctor> VRegDefs;
   public:
     static char ID; // Pass identification, replacement for typeid
     MachineLICM() : MachineFunctionPass((intptr_t)&ID) {}
@@ -92,11 +89,6 @@
       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 @@
   LI = &getAnalysis<MachineLoopInfo>();
   DT = &getAnalysis<MachineDominatorTree>();
 
-  MapVirtualRegisterDefs();
-
   for (MachineLoopInfo::iterator
          I = LI->begin(), E = LI->end(); I != E; ++I) {
     CurLoop = *I;
@@ -208,31 +198,6 @@
   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





More information about the llvm-commits mailing list