[llvm] r359446 - [LoopSimplifyCFG] Suppress expensive DomTree verification

Yevgeny Rouban via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 06:29:55 PDT 2019


Author: yrouban
Date: Mon Apr 29 06:29:55 2019
New Revision: 359446

URL: http://llvm.org/viewvc/llvm-project?rev=359446&view=rev
Log:
[LoopSimplifyCFG] Suppress expensive DomTree verification

This patch makes verification level lower for builds with
inexpensive checks.

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

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp?rev=359446&r1=359445&r2=359446&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp Mon Apr 29 06:29:55 2019
@@ -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




More information about the llvm-commits mailing list