-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Revert "[sanitizer][NFCI] Add Options parameter to LowerAllowCheckPass" #122833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-llvm-transforms Author: Thurston Dang (thurstond) ChangesReverts llvm/llvm-project#122765 Reason: buildbot breakage (https://lab.llvm.org/buildbot/#/builders/46/builds/10393)
Full diff: https://github.com/llvm/llvm-project/pull/122833.diff 4 Files Affected:
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 62c3696741a5a2..79e6bf3d24dffb 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -795,12 +795,11 @@ static void addSanitizers(const Triple &TargetTriple,
}
if (LowerAllowCheckPass::IsRequested()) {
- LowerAllowCheckPass::Options Opts;
// We want to call it after inline, which is about OptimizerEarlyEPCallback.
- PB.registerOptimizerEarlyEPCallback([&Opts](ModulePassManager &MPM,
- OptimizationLevel Level,
- ThinOrFullLTOPhase Phase) {
- MPM.addPass(createModuleToFunctionPassAdaptor(LowerAllowCheckPass(Opts)));
+ PB.registerOptimizerEarlyEPCallback([](ModulePassManager &MPM,
+ OptimizationLevel Level,
+ ThinOrFullLTOPhase Phase) {
+ MPM.addPass(createModuleToFunctionPassAdaptor(LowerAllowCheckPass()));
});
}
}
diff --git a/llvm/include/llvm/Transforms/Instrumentation/LowerAllowCheckPass.h b/llvm/include/llvm/Transforms/Instrumentation/LowerAllowCheckPass.h
index edf9102151a421..af974818fec5f3 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/LowerAllowCheckPass.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/LowerAllowCheckPass.h
@@ -24,18 +24,9 @@ namespace llvm {
// from the hot code.
class LowerAllowCheckPass : public PassInfoMixin<LowerAllowCheckPass> {
public:
- struct Options {
- std::vector<unsigned int> placeholder; // TODO: cutoffs
- };
-
- explicit LowerAllowCheckPass(LowerAllowCheckPass::Options Opts)
- : Opts(Opts) {};
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
static bool IsRequested();
-
-private:
- LowerAllowCheckPass::Options Opts;
};
} // namespace llvm
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index 0a75153de48104..f923d5aabe0a0e 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -821,21 +821,6 @@ Expected<EmbedBitcodeOptions> parseEmbedBitcodePassOptions(StringRef Params) {
return Result;
}
-Expected<LowerAllowCheckPass::Options>
-parseLowerAllowCheckPassOptions(StringRef Params) {
- LowerAllowCheckPass::Options Result;
- while (!Params.empty()) {
- StringRef ParamName;
- std::tie(ParamName, Params) = Params.split(';');
-
- return make_error<StringError>(
- formatv("invalid LowerAllowCheck pass parameter '{0}' ", ParamName)
- .str(),
- inconvertibleErrorCode());
- }
- return Result;
-}
-
Expected<MemorySanitizerOptions> parseMSanPassOptions(StringRef Params) {
MemorySanitizerOptions Result;
while (!Params.empty()) {
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index 284f15e4ad6644..1021d7fcd92474 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -402,6 +402,7 @@ FUNCTION_PASS("loop-load-elim", LoopLoadEliminationPass())
FUNCTION_PASS("loop-simplify", LoopSimplifyPass())
FUNCTION_PASS("loop-sink", LoopSinkPass())
FUNCTION_PASS("loop-versioning", LoopVersioningPass())
+FUNCTION_PASS("lower-allow-check", LowerAllowCheckPass())
FUNCTION_PASS("lower-atomic", LowerAtomicPass())
FUNCTION_PASS("lower-constant-intrinsics", LowerConstantIntrinsicsPass())
FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
@@ -552,10 +553,6 @@ FUNCTION_PASS_WITH_PARAMS(
parseLoopVectorizeOptions,
"no-interleave-forced-only;interleave-forced-only;no-vectorize-forced-only;"
"vectorize-forced-only")
-FUNCTION_PASS_WITH_PARAMS(
- "lower-allow-check", "LowerAllowCheckPass",
- [](LowerAllowCheckPass::Options Opts) { return LowerAllowCheckPass(Opts); },
- parseLowerAllowCheckPassOptions, "")
FUNCTION_PASS_WITH_PARAMS(
"lower-matrix-intrinsics", "LowerMatrixIntrinsicsPass",
[](bool Minimal) { return LowerMatrixIntrinsicsPass(Minimal); },
|
thurstond
added a commit
to thurstond/llvm-project
that referenced
this pull request
Jan 15, 2025
…ss" (llvm#122833) This reverts commit 1515caf (llvm#122833) i.e., relands 7d8b4eb (llvm#122765), with the addition of std::move to fix a stack use-after-scope error.
thurstond
added a commit
to thurstond/llvm-project
that referenced
this pull request
Jan 22, 2025
…ss" (llvm#122833) This reverts commit 1515caf (llvm#122833) i.e., relands 7d8b4eb (llvm#122765), with the addition of std::move to fix a stack use-after-scope error.
github-actions bot
pushed a commit
to arm/arm-toolchain
that referenced
this pull request
Jan 22, 2025
…llowCheckPass" (#122833) (#122994) This reverts commit 1515caf (llvm/llvm-project#122833) i.e., relands 7d8b4eb (llvm/llvm-project#122765), with LowerAllowCheckPass::Options moved inside the callback to fix a stack use-after-scope error. --------- Co-authored-by: Vitaly Buka <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang:codegen
IR generation bugs: mangling, exceptions, etc.
clang
Clang issues not falling into any other category
llvm:transforms
skip-precommit-approval
PR for CI feedback, not intended for review
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #122765
Reason: buildbot breakage (https://lab.llvm.org/buildbot/#/builders/46/builds/10393)