Skip to content

Commit 22dce16

Browse files
committed
[StandardInstrumentations] Only turn on -verify-cfg-preserved by default in expensive checks builds
https://llvm-compile-time-tracker.com/compare.php?from=3fd42f50d8aadb4d0c348ac17cd2115c1b0564a4&to=50c37f6fc62a1e7bb4f0e307c89f760d42dbe4e9&stat=instructions:u shows that this is fairly expensive, 5-10% increase in compile time, and I'd like to add more similar checks under the same flag. This matches the legacy pass manager. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D146068
1 parent a312118 commit 22dce16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Passes/StandardInstrumentations.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
using namespace llvm;
4545

4646
static cl::opt<bool> VerifyPreservedCFG("verify-cfg-preserved", cl::Hidden,
47-
#ifdef NDEBUG
48-
cl::init(false)
49-
#else
47+
#ifdef EXPENSIVE_CHECKS
5048
cl::init(true)
49+
#else
50+
cl::init(false)
5151
#endif
5252
);
5353

0 commit comments

Comments
 (0)