Skip to content

Commit 7da8ed8

Browse files
authored
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.
1 parent d480359 commit 7da8ed8

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

llvm/lib/Passes/PassRegistry.def

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass())
181181
MODULE_PASS_WITH_PARAMS(
182182
"asan", "AddressSanitizerPass",
183183
[](AddressSanitizerOptions Opts) { return AddressSanitizerPass(Opts); },
184-
parseASanPassOptions, "kernel")
184+
parseASanPassOptions, "kernel;use-after-scope")
185185
MODULE_PASS_WITH_PARAMS(
186186
"cg-profile", "CGProfilePass",
187187
[](bool InLTOPostLink) { return CGProfilePass(InLTOPostLink); },
@@ -193,15 +193,15 @@ MODULE_PASS_WITH_PARAMS(
193193
"group-by-use;ignore-single-use;max-offset=N;merge-const;"
194194
"merge-const-aggressive;merge-external;no-group-by-use;"
195195
"no-ignore-single-use;no-merge-const;no-merge-const-aggressive;"
196-
"no-merge-external;size-only")
196+
"no-merge-external")
197197
MODULE_PASS_WITH_PARAMS(
198198
"embed-bitcode", "EmbedBitcodePass",
199199
[](EmbedBitcodeOptions Opts) { return EmbedBitcodePass(Opts); },
200200
parseEmbedBitcodePassOptions, "thinlto;emit-summary")
201201
MODULE_PASS_WITH_PARAMS(
202202
"globaldce", "GlobalDCEPass",
203203
[](bool InLTOPostLink) { return GlobalDCEPass(InLTOPostLink); },
204-
parseGlobalDCEPassOptions, "in-lto-post-link")
204+
parseGlobalDCEPassOptions, "vfe-linkage-unit-visibility")
205205
MODULE_PASS_WITH_PARAMS(
206206
"hwasan", "HWAddressSanitizerPass",
207207
[](HWAddressSanitizerOptions Opts) { return HWAddressSanitizerPass(Opts); },
@@ -595,8 +595,7 @@ FUNCTION_PASS_WITH_PARAMS(
595595
"instcombine", "InstCombinePass",
596596
[](InstCombineOptions Opts) { return InstCombinePass(Opts); },
597597
parseInstCombineOptions,
598-
"no-use-loop-info;use-loop-info;no-verify-fixpoint;verify-fixpoint;"
599-
"max-iterations=N")
598+
"no-verify-fixpoint;verify-fixpoint;max-iterations=N")
600599
FUNCTION_PASS_WITH_PARAMS(
601600
"lint", "LintPass",
602601
[](bool AbortOnError) { return LintPass(AbortOnError); }, parseLintOptions,
@@ -617,7 +616,7 @@ FUNCTION_PASS_WITH_PARAMS(
617616
FUNCTION_PASS_WITH_PARAMS(
618617
"lower-allow-check", "LowerAllowCheckPass",
619618
[](LowerAllowCheckPass::Options Opts) { return LowerAllowCheckPass(Opts); },
620-
parseLowerAllowCheckPassOptions, "")
619+
parseLowerAllowCheckPassOptions, "cutoffs[indices]=N")
621620
FUNCTION_PASS_WITH_PARAMS(
622621
"lower-matrix-intrinsics", "LowerMatrixIntrinsicsPass",
623622
[](bool Minimal) { return LowerMatrixIntrinsicsPass(Minimal); },
@@ -676,10 +675,14 @@ FUNCTION_PASS_WITH_PARAMS(
676675
"simplifycfg", "SimplifyCFGPass",
677676
[](SimplifyCFGOptions Opts) { return SimplifyCFGPass(Opts); },
678677
parseSimplifyCFGOptions,
679-
"no-forward-switch-cond;forward-switch-cond;no-switch-range-to-icmp;"
680-
"switch-range-to-icmp;no-switch-to-lookup;switch-to-lookup;no-keep-loops;"
681-
"keep-loops;no-hoist-common-insts;hoist-common-insts;no-sink-common-insts;"
682-
"sink-common-insts;bonus-inst-threshold=N")
678+
"no-speculate-blocks;speculate-blocks;no-simplify-cond-branch;"
679+
"simplify-cond-branch;no-forward-switch-cond;forward-switch-cond;"
680+
"no-switch-range-to-icmp;switch-range-to-icmp;no-switch-to-lookup;"
681+
"switch-to-lookup;no-keep-loops;keep-loops;no-hoist-common-insts;"
682+
"hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;"
683+
"hoist-loads-stores-with-cond-faulting;no-sink-common-insts;"
684+
"sink-common-insts;no-speculate-unpredictables;speculate-unpredictables;"
685+
"bonus-inst-threshold=N")
683686
FUNCTION_PASS_WITH_PARAMS(
684687
"speculative-execution", "SpeculativeExecutionPass",
685688
[](bool OnlyIfDivergentTarget) {
@@ -707,7 +710,8 @@ FUNCTION_PASS_WITH_PARAMS(
707710
[](BoundsCheckingPass::Options Options) {
708711
return BoundsCheckingPass(Options);
709712
},
710-
parseBoundsCheckingOptions, "trap")
713+
parseBoundsCheckingOptions,
714+
"trap;rt;rt-abort;min-rt;min-rt-abort;merge;guard=N")
711715
#undef FUNCTION_PASS_WITH_PARAMS
712716

713717
#ifndef LOOPNEST_PASS
@@ -767,10 +771,10 @@ LOOP_PASS("print<loopnest>", LoopNestPrinterPass(errs()))
767771
#endif
768772
LOOP_PASS_WITH_PARAMS(
769773
"licm", "LICMPass", [](LICMOptions Params) { return LICMPass(Params); },
770-
parseLICMOptions, "allowspeculation")
774+
parseLICMOptions, "allowspeculation;no-allowspeculation")
771775
LOOP_PASS_WITH_PARAMS(
772776
"lnicm", "LNICMPass", [](LICMOptions Params) { return LNICMPass(Params); },
773-
parseLICMOptions, "allowspeculation")
777+
parseLICMOptions, "allowspeculation;no-allowspeculation")
774778
LOOP_PASS_WITH_PARAMS(
775779
"loop-rotate", "LoopRotatePass",
776780
[](std::pair<bool, bool> Params) {

0 commit comments

Comments
 (0)