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.

llvm-svn: 92969
This commit is contained in:
Tobias Grosser 2010-01-07 23:50:41 +00:00
parent bbe375e2fe
commit bd9f372f0a
1 changed files with 7 additions and 0 deletions

View File

@ -390,6 +390,13 @@ public:
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);