[llvm-commits] [llvm] r46488 - /llvm/trunk/lib/CodeGen/RegAllocBigBlock.cpp

Owen Anderson resistor at mac.com
Mon Jan 28 18:32:14 PST 2008


Author: resistor
Date: Mon Jan 28 20:32:13 2008
New Revision: 46488

URL: http://llvm.org/viewvc/llvm-project?rev=46488&view=rev
Log:
RegAllocBigBlock doesn't need LiveVariables either.

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

Modified: llvm/trunk/lib/CodeGen/RegAllocBigBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocBigBlock.cpp?rev=46488&r1=46487&r2=46488&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocBigBlock.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocBigBlock.cpp Mon Jan 28 20:32:13 2008
@@ -97,10 +97,6 @@
     /// etc)
     const MRegisterInfo *RegInfo;
 
-    /// LV - Our generic LiveVariables pointer
-    ///
-    LiveVariables *LV;
-
     typedef SmallVector<unsigned, 2> VRegTimes;
 
     /// VRegReadTable - maps VRegs in a BB to the set of times they are read
@@ -182,7 +178,6 @@
     /// getAnalaysisUsage - declares the required analyses
     ///
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
-      AU.addRequired<LiveVariables>();
       AU.addRequiredID(PHIEliminationID);
       AU.addRequiredID(TwoAddressInstructionPassID);
       MachineFunctionPass::getAnalysisUsage(AU);
@@ -528,9 +523,7 @@
     Ops.push_back(OpNum);
     if(MachineInstr* FMI = TII->foldMemoryOperand(MI, Ops, FrameIndex)) {
       ++NumFolded;
-      // Since we changed the address of MI, make sure to update live variables
-      // to know that the new instruction has the properties of the old one.
-      LV->instructionChanged(MI, FMI);
+      FMI->copyKillDeadInfo(MI);
       return MBB.insert(MBB.erase(MI), FMI);
     }
     
@@ -832,11 +825,8 @@
     
     // Finally, if this is a noop copy instruction, zap it.
     unsigned SrcReg, DstReg;
-    if (TII.isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg) {
-      LV->removeVirtualRegistersKilled(MI);
-      LV->removeVirtualRegistersDead(MI);
+    if (TII.isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg)
       MBB.erase(MI);
-    }
   }
 
   MachineBasicBlock::iterator MI = MBB.getFirstTerminator();
@@ -857,7 +847,6 @@
   MF = &Fn;
   TM = &Fn.getTarget();
   RegInfo = TM->getRegisterInfo();
-  LV = &getAnalysis<LiveVariables>();
 
   PhysRegsUsed.assign(RegInfo->getNumRegs(), -1);
   





More information about the llvm-commits mailing list