[llvm-commits] [llvm] r92969 - /llvm/trunk/include/llvm/Analysis/Dominators.h

Tobias Grosser grosser at fim.uni-passau.de
Thu Jan 7 15:50:41 PST 2010


Author: grosser
Date: Thu Jan  7 17:50:41 2010
New Revision: 92969

URL: http://llvm.org/viewvc/llvm-project?rev=92969&view=rev
Log:
Add assert to check dominance dfs numbers.

Compare the dominance information calculated using a dominance tree walk to the
information calculated based on DFS numbers, if XDEBUG is enabled.

Modified:
    llvm/trunk/include/llvm/Analysis/Dominators.h

Modified: llvm/trunk/include/llvm/Analysis/Dominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/Dominators.h?rev=92969&r1=92968&r2=92969&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/Dominators.h (original)
+++ llvm/trunk/include/llvm/Analysis/Dominators.h Thu Jan  7 17:50:41 2010
@@ -390,6 +390,13 @@
     if (A == 0 || B == 0)
       return false;
 
+    // Compare the result of the tree walk and the dfs numbers, if expensive
+    // checks are enabled.
+#ifdef XDEBUG
+    assert(!DFSInfoValid
+           || (dominatedBySlowTreeWalk(A, B) == B->DominatedBy(A)));
+#endif
+
     if (DFSInfoValid)
       return B->DominatedBy(A);
 





More information about the llvm-commits mailing list