From: Yevgeny Rouban Date: Mon, 29 Apr 2019 13:29:55 +0000 (+0000) Subject: [LoopSimplifyCFG] Suppress expensive DomTree verification X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8fab5b74fa3ccd4e35c4efa1b009edfbeb18501;p=llvm [LoopSimplifyCFG] Suppress expensive DomTree verification 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 --- diff --git a/lib/Transforms/Scalar/LoopSimplifyCFG.cpp b/lib/Transforms/Scalar/LoopSimplifyCFG.cpp index b565cb9c236..9fa4afb8217 100644 --- a/lib/Transforms/Scalar/LoopSimplifyCFG.cpp +++ b/lib/Transforms/Scalar/LoopSimplifyCFG.cpp @@ -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