[llvm] 3849dc1 - [NFC] Move some asserts out of Expensive Checks

Max Kazantsev via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 03:43:40 PST 2023


Author: Max Kazantsev
Date: 2023-02-14T18:43:30+07:00
New Revision: 3849dc1f8eebe67287831512eadeadebdd8a05c1

URL: https://github.com/llvm/llvm-project/commit/3849dc1f8eebe67287831512eadeadebdd8a05c1
DIFF: https://github.com/llvm/llvm-project/commit/3849dc1f8eebe67287831512eadeadebdd8a05c1.diff

LOG: [NFC] Move some asserts out of Expensive Checks

This was done by reviewer's request, but in fact without them we
skip very nasty bugs. Unless it is a REAL problem, I'd keep them
in default setup.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
index ee0cffe6271a..3ce3e00e5f8d 100644
--- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -3021,7 +3021,7 @@ injectPendingInvariantConditions(NonTrivialUnswitchCandidate Candidate, Loop &L,
     MSSAU->applyUpdates(DTUpdates, DT);
   L.addBasicBlockToLoop(CheckBlock, LI);
 
-#ifdef EXPENSIVE_CHECKS
+#ifndef NDEBUG
   DT.verify();
   LI.verify(DT);
   if (MSSAU && VerifyMemorySSA)


        


More information about the llvm-commits mailing list