[llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 16 00:52:01 PDT 2004


Changes in directory llvm/lib/VMCore:

Verifier.cpp updated: 1.95 -> 1.96

---
Log message:

Make sure to check for a very bad class of errors: an instruction
that does not dominate all of its users, but is in the same basic block as
its users.  This class of error is what caused the mysterious CBE only 
failures last night.


---
Diffs of the changes:  (+6 -0)

Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.95 llvm/lib/VMCore/Verifier.cpp:1.96
--- llvm/lib/VMCore/Verifier.cpp:1.95	Wed Apr 14 10:06:48 2004
+++ llvm/lib/VMCore/Verifier.cpp	Fri Apr 16 00:51:47 2004
@@ -559,6 +559,12 @@
         // exceptional destination.
         if (InvokeInst *II = dyn_cast<InvokeInst>(Op))
           OpBlock = II->getNormalDest();
+        else if (OpBlock == BB) {
+          // If they are in the same basic block, make sure that the definition
+          // comes before the use.
+          Assert2(DS->dominates(Op, &I),
+                  "Instruction does not dominate all uses!", Op, &I);
+        }
 
         // Definition must dominate use unless use is unreachable!
         Assert2(DS->dominates(OpBlock, BB) ||





More information about the llvm-commits mailing list