Eliminate the loop that searches through each of the operands
[oota-llvm.git] / include / llvm / CodeGen / RegisterScavenging.h
index 0108dcd0463a1fa8837abb17aa14ae93311c34d8..05e9e55e234344b63930c1c989cb74cb532809a7 100644 (file)
@@ -86,10 +86,6 @@ public:
     : MBB(NULL), NumPhysRegs(0), Tracking(false),
       ScavengingFrameIndex(-1), ScavengedReg(0), ScavengedRC(NULL) {}
 
-  explicit RegScavenger(MachineBasicBlock *mbb)
-    : MBB(mbb), NumPhysRegs(0), Tracking(false),
-      ScavengingFrameIndex(-1), ScavengedReg(0), ScavengedRC(NULL) {}
-
   /// enterBasicBlock - Start tracking liveness from the begin of the specific
   /// basic block.
   void enterBasicBlock(MachineBasicBlock *mbb);
@@ -102,6 +98,7 @@ public:
   /// forward / backward - Move the internal MBB iterator and update register
   /// states until it has processed the specific iterator.
   void forward(MachineBasicBlock::iterator I) {
+    if (!Tracking && MBB->begin() != I) forward();
     while (MBBI != I) forward();
   }
   void backward(MachineBasicBlock::iterator I) {