[llvm-commits] CVS: llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp

Vikram Adve vadve at cs.uiuc.edu
Thu Aug 14 15:47:01 PDT 2003


Changes in directory llvm/lib/Analysis/LiveVar:

FunctionLiveVarInfo.cpp updated: 1.45 -> 1.46

---
Log message:

Improvement to the previous fix: branch following a delay slot of
another delayed instr. would cause the later sanity-check (assertion)
in PhyRegAlloc.cpp to fail, even though there is really no error.


---
Diffs of the changes:

Index: llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp
diff -u llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp:1.45 llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp:1.46
--- llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp:1.45	Tue Aug 12 17:19:59 2003
+++ llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp	Thu Aug 14 15:45:56 2003
@@ -290,9 +290,11 @@
       for (unsigned i = 0; i < DS; ++i, ++fwdMII) {
         assert(fwdMII != MIVec.end() && "Missing instruction in delay slot?");
         MachineInstr* DelaySlotMI = *fwdMII;
-        set_union(*MInst2LVSetBI[DelaySlotMI], *NewSet);
-        if (i+1 == DS)
-          set_union(*MInst2LVSetAI[DelaySlotMI], *NewSet);
+        if (! TM.getInstrInfo().isNop(DelaySlotMI->getOpCode())) {
+          set_union(*MInst2LVSetBI[DelaySlotMI], *NewSet);
+          if (i+1 == DS)
+            set_union(*MInst2LVSetAI[DelaySlotMI], *NewSet);
+        }
       }
     }
 





More information about the llvm-commits mailing list