aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorThurston Dang <thurston@google.com>2025-01-29 22:03:05 -0800
committerGitHub <noreply@github.com>2025-01-29 22:03:05 -0800
commit928cad49beec0120686478f502899222e836b545 (patch)
tree8af7c98ff023641dff043d98cfa1a0b3372f14c3 /clang/lib/CodeGen/BackendUtil.cpp
parentfd94c851222e984912948ef46e0329cc32d44105 (diff)
downloadllvm-928cad49beec0120686478f502899222e836b545.zip
llvm-928cad49beec0120686478f502899222e836b545.tar.gz
llvm-928cad49beec0120686478f502899222e836b545.tar.bz2
Revert "[ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass<cutoffs>" (#125032)
Reverts llvm/llvm-project#124857 due to buildbot breakage (https://lab.llvm.org/buildbot/#/builders/46/builds/11310)
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index bc32878..3e65eeb 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -795,20 +795,12 @@ static void addSanitizers(const Triple &TargetTriple,
PB.registerOptimizerLastEPCallback(SanitizersCallback);
}
- // SanitizeSkipHotCutoffs: doubles with range [0, 1]
- // Opts.cutoffs: unsigned ints with range [0, 1000000]
- auto ScaledCutoffs = CodeGenOpts.SanitizeSkipHotCutoffs.getAllScaled(1000000);
-
- // TODO: remove IsRequested()
- if (LowerAllowCheckPass::IsRequested() || ScaledCutoffs.has_value()) {
+ if (LowerAllowCheckPass::IsRequested()) {
// We want to call it after inline, which is about OptimizerEarlyEPCallback.
PB.registerOptimizerEarlyEPCallback([&](ModulePassManager &MPM,
OptimizationLevel Level,
ThinOrFullLTOPhase Phase) {
LowerAllowCheckPass::Options Opts;
- // TODO: after removing IsRequested(), make this unconditional
- if (ScaledCutoffs.has_value())
- Opts.cutoffs = ScaledCutoffs.value();
MPM.addPass(createModuleToFunctionPassAdaptor(LowerAllowCheckPass(Opts)));
});
}