[llvm-commits] [llvm] r144015 - /llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Nov 7 13:23:42 PST 2011


Author: stoklund
Date: Mon Nov  7 15:23:42 2011
New Revision: 144015

URL: http://llvm.org/viewvc/llvm-project?rev=144015&view=rev
Log:
MBB doesn't need to be a class member.

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

Modified: llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp?rev=144015&r1=144014&r2=144015&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp (original)
+++ llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp Mon Nov  7 15:23:42 2011
@@ -111,7 +111,6 @@
   MachineFunction *MF;
   const TargetInstrInfo *TII;
   const TargetRegisterInfo *TRI;
-  MachineBasicBlock *MBB;
   std::vector<int> AliasMap;
   const unsigned NumRegs;
   DomainValue **LiveRegs;
@@ -149,7 +148,7 @@
   void Collapse(DomainValue *dv, unsigned domain);
   bool Merge(DomainValue *A, DomainValue *B);
 
-  void enterBasicBlock();
+  void enterBasicBlock(MachineBasicBlock*);
   void visitGenericInstr(MachineInstr*);
   void visitSoftInstr(MachineInstr*, unsigned mask);
   void visitHardInstr(MachineInstr*, unsigned domain);
@@ -271,7 +270,7 @@
   return true;
 }
 
-void ExeDepsFix::enterBasicBlock() {
+void ExeDepsFix::enterBasicBlock(MachineBasicBlock *MBB) {
   // Try to coalesce live-out registers from predecessors.
   for (MachineBasicBlock::livein_iterator i = MBB->livein_begin(),
          e = MBB->livein_end(); i != e; ++i) {
@@ -451,7 +450,6 @@
   MF = &mf;
   TII = MF->getTarget().getInstrInfo();
   TRI = MF->getTarget().getRegisterInfo();
-  MBB = 0;
   LiveRegs = 0;
   Distance = 0;
   assert(NumRegs == RC->getNumRegs() && "Bad regclass");
@@ -482,8 +480,8 @@
   for (df_ext_iterator<MachineBasicBlock*, SmallPtrSet<MachineBasicBlock*, 16> >
          DFI = df_ext_begin(Entry, Visited), DFE = df_ext_end(Entry, Visited);
          DFI != DFE; ++DFI) {
-    MBB = *DFI;
-    enterBasicBlock();
+    MachineBasicBlock *MBB = *DFI;
+    enterBasicBlock(MBB);
     for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E;
         ++I) {
       MachineInstr *mi = I;





More information about the llvm-commits mailing list