[llvm] 7da8ed8 - Fix missing/outdated pass options in PassRegistry.def (#146160)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 1 12:41:29 PDT 2025
Author: Meredith Julian
Date: 2025-07-01T12:41:26-07:00
New Revision: 7da8ed8d339a06e1dcef4be2eb3b532f833ae6b2
URL: https://github.com/llvm/llvm-project/commit/7da8ed8d339a06e1dcef4be2eb3b532f833ae6b2
DIFF: https://github.com/llvm/llvm-project/commit/7da8ed8d339a06e1dcef4be2eb3b532f833ae6b2.diff
LOG: Fix missing/outdated pass options in PassRegistry.def (#146160)
There are a handful of passes in PassRegistry.def with outdated or
missing pass options. These strings describing pass options are used for
the printPassNames() function only, which is likely why they have gotten
out-of-date without being caught. This MR simply changes the few passes
where the option string is out-of-date, fixing the output of
-print-passes. This does not affect functionality of the pipeline
parser, and is hard to verify in a unit test, so no tests were added.
Added:
Modified:
llvm/lib/Passes/PassRegistry.def
Removed:
################################################################################
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index 56e049602cc06..dd3dab3425975 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -181,7 +181,7 @@ MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass())
MODULE_PASS_WITH_PARAMS(
"asan", "AddressSanitizerPass",
[](AddressSanitizerOptions Opts) { return AddressSanitizerPass(Opts); },
- parseASanPassOptions, "kernel")
+ parseASanPassOptions, "kernel;use-after-scope")
MODULE_PASS_WITH_PARAMS(
"cg-profile", "CGProfilePass",
[](bool InLTOPostLink) { return CGProfilePass(InLTOPostLink); },
@@ -193,7 +193,7 @@ MODULE_PASS_WITH_PARAMS(
"group-by-use;ignore-single-use;max-offset=N;merge-const;"
"merge-const-aggressive;merge-external;no-group-by-use;"
"no-ignore-single-use;no-merge-const;no-merge-const-aggressive;"
- "no-merge-external;size-only")
+ "no-merge-external")
MODULE_PASS_WITH_PARAMS(
"embed-bitcode", "EmbedBitcodePass",
[](EmbedBitcodeOptions Opts) { return EmbedBitcodePass(Opts); },
@@ -201,7 +201,7 @@ MODULE_PASS_WITH_PARAMS(
MODULE_PASS_WITH_PARAMS(
"globaldce", "GlobalDCEPass",
[](bool InLTOPostLink) { return GlobalDCEPass(InLTOPostLink); },
- parseGlobalDCEPassOptions, "in-lto-post-link")
+ parseGlobalDCEPassOptions, "vfe-linkage-unit-visibility")
MODULE_PASS_WITH_PARAMS(
"hwasan", "HWAddressSanitizerPass",
[](HWAddressSanitizerOptions Opts) { return HWAddressSanitizerPass(Opts); },
@@ -595,8 +595,7 @@ FUNCTION_PASS_WITH_PARAMS(
"instcombine", "InstCombinePass",
[](InstCombineOptions Opts) { return InstCombinePass(Opts); },
parseInstCombineOptions,
- "no-use-loop-info;use-loop-info;no-verify-fixpoint;verify-fixpoint;"
- "max-iterations=N")
+ "no-verify-fixpoint;verify-fixpoint;max-iterations=N")
FUNCTION_PASS_WITH_PARAMS(
"lint", "LintPass",
[](bool AbortOnError) { return LintPass(AbortOnError); }, parseLintOptions,
@@ -617,7 +616,7 @@ FUNCTION_PASS_WITH_PARAMS(
FUNCTION_PASS_WITH_PARAMS(
"lower-allow-check", "LowerAllowCheckPass",
[](LowerAllowCheckPass::Options Opts) { return LowerAllowCheckPass(Opts); },
- parseLowerAllowCheckPassOptions, "")
+ parseLowerAllowCheckPassOptions, "cutoffs[indices]=N")
FUNCTION_PASS_WITH_PARAMS(
"lower-matrix-intrinsics", "LowerMatrixIntrinsicsPass",
[](bool Minimal) { return LowerMatrixIntrinsicsPass(Minimal); },
@@ -676,10 +675,14 @@ FUNCTION_PASS_WITH_PARAMS(
"simplifycfg", "SimplifyCFGPass",
[](SimplifyCFGOptions Opts) { return SimplifyCFGPass(Opts); },
parseSimplifyCFGOptions,
- "no-forward-switch-cond;forward-switch-cond;no-switch-range-to-icmp;"
- "switch-range-to-icmp;no-switch-to-lookup;switch-to-lookup;no-keep-loops;"
- "keep-loops;no-hoist-common-insts;hoist-common-insts;no-sink-common-insts;"
- "sink-common-insts;bonus-inst-threshold=N")
+ "no-speculate-blocks;speculate-blocks;no-simplify-cond-branch;"
+ "simplify-cond-branch;no-forward-switch-cond;forward-switch-cond;"
+ "no-switch-range-to-icmp;switch-range-to-icmp;no-switch-to-lookup;"
+ "switch-to-lookup;no-keep-loops;keep-loops;no-hoist-common-insts;"
+ "hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;"
+ "hoist-loads-stores-with-cond-faulting;no-sink-common-insts;"
+ "sink-common-insts;no-speculate-unpredictables;speculate-unpredictables;"
+ "bonus-inst-threshold=N")
FUNCTION_PASS_WITH_PARAMS(
"speculative-execution", "SpeculativeExecutionPass",
[](bool OnlyIfDivergentTarget) {
@@ -707,7 +710,8 @@ FUNCTION_PASS_WITH_PARAMS(
[](BoundsCheckingPass::Options Options) {
return BoundsCheckingPass(Options);
},
- parseBoundsCheckingOptions, "trap")
+ parseBoundsCheckingOptions,
+ "trap;rt;rt-abort;min-rt;min-rt-abort;merge;guard=N")
#undef FUNCTION_PASS_WITH_PARAMS
#ifndef LOOPNEST_PASS
@@ -767,10 +771,10 @@ LOOP_PASS("print<loopnest>", LoopNestPrinterPass(errs()))
#endif
LOOP_PASS_WITH_PARAMS(
"licm", "LICMPass", [](LICMOptions Params) { return LICMPass(Params); },
- parseLICMOptions, "allowspeculation")
+ parseLICMOptions, "allowspeculation;no-allowspeculation")
LOOP_PASS_WITH_PARAMS(
"lnicm", "LNICMPass", [](LICMOptions Params) { return LNICMPass(Params); },
- parseLICMOptions, "allowspeculation")
+ parseLICMOptions, "allowspeculation;no-allowspeculation")
LOOP_PASS_WITH_PARAMS(
"loop-rotate", "LoopRotatePass",
[](std::pair<bool, bool> Params) {
More information about the llvm-commits
mailing list