]> granicus.if.org Git - llvm/commitdiff
[LoopSimplifyCFG] Suppress expensive DomTree verification
authorYevgeny Rouban <yevgeny.rouban@azul.com>
Mon, 29 Apr 2019 13:29:55 +0000 (13:29 +0000)
committerYevgeny Rouban <yevgeny.rouban@azul.com>
Mon, 29 Apr 2019 13:29:55 +0000 (13:29 +0000)
This patch makes verification level lower for builds with
inexpensive checks.

Differential Revision: https://reviews.llvm.org/D61055

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359446 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopSimplifyCFG.cpp

index b565cb9c2361e485c8186a8caf6cbe1b97d4c1d5..9fa4afb8217a80f594353d554c954ffc2d7c9caa 100644 (file)
@@ -598,7 +598,13 @@ public:
 
 #ifndef NDEBUG
     // Make sure that we have preserved all data structures after the transform.
-    assert(DT.verify() && "DT broken after transform!");
+#if defined(EXPENSIVE_CHECKS)
+    assert(DT.verify(DominatorTree::VerificationLevel::Full) &&
+           "DT broken after transform!");
+#else
+    assert(DT.verify(DominatorTree::VerificationLevel::Fast) &&
+           "DT broken after transform!");
+#endif
     assert(DT.isReachableFromEntry(Header));
     LI.verify(DT);
 #endif