[llvm] 22dce16 - [StandardInstrumentations] Only turn on -verify-cfg-preserved by default in expensive checks builds
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 15 08:38:47 PDT 2023
Author: Arthur Eubanks
Date: 2023-03-15T08:38:26-07:00
New Revision: 22dce16ea76466c9b6ddacac7d7d99e888f646b4
URL: https://github.com/llvm/llvm-project/commit/22dce16ea76466c9b6ddacac7d7d99e888f646b4
DIFF: https://github.com/llvm/llvm-project/commit/22dce16ea76466c9b6ddacac7d7d99e888f646b4.diff
LOG: [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
Added:
Modified:
llvm/lib/Passes/StandardInstrumentations.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp
index 761da25241d2..24a9b8f59384 100644
--- a/llvm/lib/Passes/StandardInstrumentations.cpp
+++ b/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
);
More information about the llvm-commits
mailing list