[llvm-commits] [llvm] r48910 - in /llvm/trunk: docs/Passes.html lib/VMCore/Verifier.cpp

Nick Lewycky nicholas at mxc.ca
Thu Mar 27 23:46:51 PDT 2008


Author: nicholas
Date: Fri Mar 28 01:46:51 2008
New Revision: 48910

URL: http://llvm.org/viewvc/llvm-project?rev=48910&view=rev
Log:
Update example to new syntax.

Modified:
    llvm/trunk/docs/Passes.html
    llvm/trunk/lib/VMCore/Verifier.cpp

Modified: llvm/trunk/docs/Passes.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Passes.html?rev=48910&r1=48909&r2=48910&view=diff

==============================================================================
--- llvm/trunk/docs/Passes.html (original)
+++ llvm/trunk/docs/Passes.html Fri Mar 28 01:46:51 2008
@@ -1864,7 +1864,7 @@
     <li>The code is in valid SSA form.</li>
     <li>It should be illegal to put a label into any other type (like a
         structure) or to return one. [except constant arrays!]</li>
-    <li>Only phi nodes can be self referential: <tt>%x = add int %x, %x</tt> is
+    <li>Only phi nodes can be self referential: <tt>%x = add i32 %x, %x</tt> is
         invalid.</li>
     <li>PHI nodes must have an entry for each predecessor, with no extras.</li>
     <li>PHI nodes must be the first thing in a basic block, all grouped

Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=48910&r1=48909&r2=48910&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Fri Mar 28 01:46:51 2008
@@ -21,7 +21,7 @@
 //  * The code is in valid SSA form
 //  * It should be illegal to put a label into any other type (like a structure)
 //    or to return one. [except constant arrays!]
-//  * Only phi nodes can be self referential: 'add int %0, %0 ; <int>:0' is bad
+//  * Only phi nodes can be self referential: 'add i32 %0, %0 ; <int>:0' is bad
 //  * PHI nodes must have an entry for each predecessor, with no extras.
 //  * PHI nodes must be the first thing in a basic block, all grouped together
 //  * PHI nodes must have at least one entry
@@ -530,6 +530,12 @@
   // Ensure that basic blocks have terminators!
   Assert1(BB.getTerminator(), "Basic Block does not have terminator!", &BB);
 
+  // Ensure that the BB doesn't point out of its Function for unwinding.
+  Assert2(!BB.getUnwindDest() ||
+          BB.getUnwindDest()->getParent() == BB.getParent(),
+          "Basic Block unwinds to block in different function!",
+          &BB, BB.getUnwindDest());
+
   // Check constraints that this basic block imposes on all of the PHI nodes in
   // it.
   if (isa<PHINode>(BB.front())) {
@@ -1217,7 +1223,7 @@
         }
 
         // Definition must dominate use unless use is unreachable!
-        Assert2(DT->dominates(OpBlock, BB) ||
+        Assert2(DT->dominates(Op, &I) ||
                 !DT->dominates(&BB->getParent()->getEntryBlock(), BB),
                 "Instruction does not dominate all uses!", Op, &I);
       } else {





More information about the llvm-commits mailing list