aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2024-04-04 14:32:30 -0700
committerGitHub <noreply@github.com>2024-04-04 14:32:30 -0700
commit18380c522a90dd849caca3da28cd26c4c4c53eaf (patch)
tree3354a95a8f153cabcbb0fcfb97eddaa33156a59c /clang/lib/CodeGen/BackendUtil.cpp
parente628581aaab18cbd9bd33a4a42c57da0e018d32f (diff)
downloadllvm-18380c522a90dd849caca3da28cd26c4c4c53eaf.zip
llvm-18380c522a90dd849caca3da28cd26c4c4c53eaf.tar.gz
llvm-18380c522a90dd849caca3da28cd26c4c4c53eaf.tar.bz2
[UBSAN][HWASAN] Remove redundant flags (#87709)
Presense of `cutoff-hot` or `random-skip-rate` should be enough to trigger optimization.
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index c8b2a93..e25a176 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -100,9 +100,6 @@ using namespace llvm;
namespace llvm {
extern cl::opt<bool> PrintPipelinePasses;
-static cl::opt<bool> ClRemoveTraps("clang-remove-traps", cl::Optional,
- cl::desc("Insert remove-traps pass."));
-
// Experiment to move sanitizers earlier.
static cl::opt<bool> ClSanitizeOnOptimizerEarlyEP(
"sanitizer-early-opt-ep", cl::Optional,
@@ -750,7 +747,7 @@ static void addSanitizers(const Triple &TargetTriple,
PB.registerOptimizerLastEPCallback(SanitizersCallback);
}
- if (ClRemoveTraps) {
+ if (RemoveTrapsPass::IsRequested()) {
// We can optimize after inliner, and PGO profile matching. The hook below
// is called at the end `buildFunctionSimplificationPipeline`, which called
// from `buildInlinerPipeline`, which called after profile matching.