[PATCH] D146068: [StandardInstrumentations] Only turn on -verify-cfg-preserved by default in expensive checks builds
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 14 10:19:59 PDT 2023
aeubanks created this revision.
aeubanks added reviewers: yrouban, nikic.
Herald added subscribers: StephenFan, hiraditya.
Herald added a reviewer: ctetreau.
Herald added a project: All.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146068
Files:
llvm/lib/Passes/StandardInstrumentations.cpp
Index: llvm/lib/Passes/StandardInstrumentations.cpp
===================================================================
--- llvm/lib/Passes/StandardInstrumentations.cpp
+++ llvm/lib/Passes/StandardInstrumentations.cpp
@@ -44,10 +44,10 @@
using namespace llvm;
static cl::opt<bool> VerifyPreservedCFG("verify-cfg-preserved", cl::Hidden,
-#ifdef NDEBUG
- cl::init(false)
-#else
+#ifdef EXPENSIVE_CHECKS
cl::init(true)
+#else
+ cl::init(false)
#endif
);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146068.505156.patch
Type: text/x-patch
Size: 578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230314/66aa3133/attachment-0001.bin>
More information about the llvm-commits
mailing list