Last active
April 21, 2025 07:46
-
-
Save gingerBill/d889ae03d429653a4a9081ad6dc2a6c3 to your computer and use it in GitHub Desktop.
LLVM 17.0.1 default<O?> module passes
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 17.0.1 Passes | |
| ## default<O0> | |
| always-inline, | |
| coro-cond( | |
| coro-early, | |
| cgscc( | |
| coro-split | |
| ), | |
| coro-cleanup, | |
| globaldce | |
| ), | |
| function( | |
| annotation-remarks | |
| ), | |
| verify | |
| ## default<O1> | |
| annotation2metadata, | |
| forceattrs, | |
| inferattrs, | |
| coro-early, | |
| function<eager-inv>( | |
| lower-expect, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| sroa<modify-cfg>, | |
| early-cse<> | |
| ), | |
| openmp-opt, | |
| ipsccp, | |
| called-value-propagation, | |
| globalopt, | |
| function<eager-inv>( | |
| mem2reg, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch> | |
| ), | |
| require<globals-aa>, | |
| function( | |
| invalidate<aa> | |
| ), | |
| require<profile-summary>, | |
| cgscc( | |
| devirt<4>( | |
| inline<only-mandatory>, | |
| inline, | |
| function-attrs<skip-non-recursive>, | |
| function<eager-inv;no-rerun>( // This is the function-simplication<O1> pass | |
| sroa<modify-cfg>, | |
| early-cse<memssa>, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| libcalls-shrinkwrap, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| reassociate, | |
| loop-mssa( | |
| loop-instsimplify, | |
| loop-simplifycfg, | |
| licm<no-allowspeculation>, | |
| loop-rotate<header-duplication;no-prepare-for-lto>, | |
| licm<allowspeculation>, | |
| simple-loop-unswitch<no-nontrivial;trivial> | |
| ), | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop( | |
| loop-idiom, | |
| indvars, | |
| loop-deletion, | |
| loop-unroll-full | |
| ), | |
| sroa<modify-cfg>, | |
| memcpyopt, | |
| sccp, | |
| bdce, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| coro-elide, | |
| adce, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info> | |
| ), | |
| function-attrs, | |
| function( | |
| require<should-not-run-function-passes> | |
| ), | |
| coro-split | |
| ) | |
| ), | |
| deadargelim, | |
| coro-cleanup, | |
| globalopt, | |
| globaldce, | |
| elim-avail-extern, | |
| rpo-function-attrs, | |
| recompute-globalsaa, | |
| function<eager-inv>( | |
| float2int, | |
| lower-constant-intrinsics, | |
| loop( | |
| loop-rotate<header-duplication;no-prepare-for-lto>, | |
| loop-deletion | |
| ), | |
| loop-distribute, | |
| inject-tli-mappings, | |
| loop-vectorize<no-interleave-forced-only;vectorize-forced-only;>, | |
| loop-load-elim, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| vector-combine, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop-unroll<O1>, | |
| transform-warning, | |
| sroa<preserve-cfg>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop-mssa( | |
| licm<allowspeculation> | |
| ), | |
| alignment-from-assumptions, | |
| loop-sink, | |
| instsimplify, | |
| div-rem-pairs, | |
| tailcallelim, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch> | |
| ), | |
| globaldce, | |
| constmerge, | |
| cg-profile, | |
| rel-lookup-table-converter, | |
| function(annotation-remarks), | |
| verify | |
| ## default<O2> | |
| annotation2metadata, | |
| forceattrs, | |
| inferattrs, | |
| coro-early, | |
| function<eager-inv>( | |
| lower-expect, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| sroa<modify-cfg>, | |
| early-cse<> | |
| ), | |
| openmp-opt, | |
| ipsccp, | |
| called-value-propagation, | |
| globalopt, | |
| function<eager-inv>( | |
| mem2reg, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch> | |
| ), | |
| require<globals-aa>, | |
| function( | |
| invalidate<aa> | |
| ), | |
| require<profile-summary>, | |
| cgscc( | |
| devirt<4>( | |
| inline<only-mandatory>, | |
| inline, | |
| function-attrs<skip-non-recursive>, | |
| openmp-opt-cgscc, | |
| function<eager-inv;no-rerun>( // This is the function-simplication<O2> pass | |
| sroa<modify-cfg>, | |
| early-cse<memssa>, | |
| speculative-execution, | |
| jump-threading, | |
| correlated-propagation, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| aggressive-instcombine, | |
| constraint-elimination, | |
| libcalls-shrinkwrap, | |
| tailcallelim, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| reassociate, | |
| loop-mssa( | |
| loop-instsimplify, | |
| loop-simplifycfg, | |
| licm<no-allowspeculation>, | |
| loop-rotate<header-duplication;no-prepare-for-lto>, | |
| licm<allowspeculation>, | |
| simple-loop-unswitch<no-nontrivial;trivial> | |
| ), | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop( | |
| loop-idiom, | |
| indvars, | |
| loop-deletion, | |
| loop-unroll-full | |
| ), | |
| sroa<modify-cfg>, | |
| vector-combine, | |
| mldst-motion<no-split-footer-bb>, | |
| gvn<>, | |
| sccp, | |
| bdce, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| jump-threading, | |
| correlated-propagation, | |
| adce, | |
| memcpyopt, | |
| dse, | |
| move-auto-init, | |
| loop-mssa( | |
| licm<allowspeculation> | |
| ), | |
| coro-elide, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info> | |
| ), | |
| function-attrs, | |
| function( | |
| require<should-not-run-function-passes> | |
| ), | |
| coro-split | |
| ) | |
| ), | |
| deadargelim, | |
| coro-cleanup, | |
| globalopt, | |
| globaldce, | |
| elim-avail-extern, | |
| rpo-function-attrs, | |
| recompute-globalsaa, | |
| function<eager-inv>( | |
| float2int, | |
| lower-constant-intrinsics,loop( | |
| loop-rotate<header-duplication;no-prepare-for-lto>, | |
| loop-deletion | |
| ), | |
| loop-distribute, | |
| inject-tli-mappings, | |
| loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>, | |
| loop-load-elim,instcombine<max-iterations=1000;no-use-loop-info>, | |
| simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| slp-vectorizer, | |
| vector-combine, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop-unroll<O2>, | |
| transform-warning, | |
| sroa<preserve-cfg>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop-mssa( | |
| licm<allowspeculation> | |
| ), | |
| alignment-from-assumptions, | |
| loop-sink, | |
| instsimplify, | |
| div-rem-pairs, | |
| tailcallelim, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch> | |
| ), | |
| globaldce, | |
| constmerge, | |
| cg-profile, | |
| rel-lookup-table-converter, | |
| function( | |
| annotation-remarks | |
| ), | |
| verify | |
| ## default<O3> | |
| annotation2metadata, | |
| forceattrs, | |
| inferattrs, | |
| coro-early, | |
| function<eager-inv>( | |
| lower-expect, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| sroa<modify-cfg>, | |
| early-cse<>, | |
| callsite-splitting | |
| ), | |
| openmp-opt, | |
| ipsccp, | |
| called-value-propagation, | |
| globalopt, | |
| function<eager-inv>( | |
| mem2reg, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch> | |
| ), | |
| require<globals-aa>, | |
| function( | |
| invalidate<aa> | |
| ), | |
| require<profile-summary>, | |
| cgscc( | |
| devirt<4>( | |
| inline<only-mandatory>, | |
| inline, | |
| function-attrs<skip-non-recursive>, | |
| argpromotion, | |
| openmp-opt-cgscc, | |
| function<eager-inv;no-rerun>( // This is the function-simplication<O3> pass | |
| sroa<modify-cfg>, | |
| early-cse<memssa>, | |
| speculative-execution, | |
| jump-threading, | |
| correlated-propagation, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| aggressive-instcombine, | |
| constraint-elimination, | |
| libcalls-shrinkwrap, | |
| tailcallelim, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| reassociate, | |
| loop-mssa( | |
| loop-instsimplify, | |
| loop-simplifycfg, | |
| licm<no-allowspeculation>, | |
| loop-rotate<header-duplication;no-prepare-for-lto>, | |
| licm<allowspeculation>, | |
| simple-loop-unswitch<nontrivial;trivial> | |
| ), | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop( | |
| loop-idiom, | |
| indvars, | |
| loop-deletion, | |
| loop-unroll-full | |
| ), | |
| sroa<modify-cfg>, | |
| vector-combine, | |
| mldst-motion<no-split-footer-bb>, | |
| gvn<>, | |
| sccp, | |
| bdce, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| jump-threading, | |
| correlated-propagation, | |
| adce, | |
| memcpyopt, | |
| dse, | |
| move-auto-init, | |
| loop-mssa( | |
| licm<allowspeculation> | |
| ), | |
| coro-elide, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info> | |
| ), | |
| function-attrs, | |
| function( | |
| require<should-not-run-function-passes> | |
| ), | |
| coro-split | |
| ) | |
| ), | |
| deadargelim, | |
| coro-cleanup, | |
| globalopt, | |
| globaldce, | |
| elim-avail-extern, | |
| rpo-function-attrs, | |
| recompute-globalsaa, | |
| function<eager-inv>( | |
| float2int, | |
| lower-constant-intrinsics, | |
| chr, | |
| loop( | |
| loop-rotate<header-duplication;no-prepare-for-lto>, | |
| loop-deletion | |
| ), | |
| loop-distribute, | |
| inject-tli-mappings, | |
| loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>, | |
| loop-load-elim, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| slp-vectorizer, | |
| vector-combine, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop-unroll<O3>, | |
| transform-warning, | |
| sroa<preserve-cfg>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop-mssa( | |
| licm<allowspeculation> | |
| ), | |
| alignment-from-assumptions, | |
| loop-sink, | |
| instsimplify, | |
| div-rem-pairs, | |
| tailcallelim, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch> | |
| ), | |
| globaldce, | |
| constmerge, | |
| cg-profile, | |
| rel-lookup-table-converter, | |
| function( | |
| annotation-remarks | |
| ), | |
| verify | |
| ## default<Os> | |
| annotation2metadata, | |
| forceattrs, | |
| inferattrs, | |
| coro-early, | |
| function<eager-inv>( | |
| lower-expect, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| sroa<modify-cfg>, | |
| early-cse<> | |
| ), | |
| openmp-opt, | |
| ipsccp, | |
| called-value-propagation, | |
| globalopt, | |
| function<eager-inv>( | |
| mem2reg, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>), | |
| require<globals-aa>, | |
| function( | |
| invalidate<aa> | |
| ), | |
| require<profile-summary>, | |
| cgscc( | |
| devirt<4>( | |
| inline<only-mandatory>, | |
| inline, | |
| function-attrs<skip-non-recursive>, | |
| function<eager-inv;no-rerun>( // This is the function-simplication<Os> pass | |
| sroa<modify-cfg>, | |
| early-cse<memssa>, | |
| speculative-execution, | |
| jump-threading, | |
| correlated-propagation, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| aggressive-instcombine, | |
| constraint-elimination, | |
| tailcallelim, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| reassociate, | |
| loop-mssa( | |
| loop-instsimplify, | |
| loop-simplifycfg, | |
| licm<no-allowspeculation>, | |
| loop-rotate<header-duplication;no-prepare-for-lto>, | |
| licm<allowspeculation>, | |
| simple-loop-unswitch<no-nontrivial;trivial> | |
| ), | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop( | |
| loop-idiom, | |
| indvars, | |
| loop-deletion, | |
| loop-unroll-full | |
| ), | |
| sroa<modify-cfg>, | |
| vector-combine, | |
| mldst-motion<no-split-footer-bb>, | |
| gvn<>, | |
| sccp, | |
| bdce, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| jump-threading, | |
| correlated-propagation, | |
| adce, | |
| memcpyopt, | |
| dse, | |
| move-auto-init, | |
| loop-mssa( | |
| licm<allowspeculation> | |
| ), | |
| coro-elide, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| instcombine<max-iterations=1000;no-use-loop-info> | |
| ), | |
| function-attrs, | |
| function( | |
| require<should-not-run-function-passes> | |
| ), | |
| coro-split | |
| ) | |
| ), | |
| deadargelim, | |
| coro-cleanup, | |
| globalopt, | |
| globaldce, | |
| elim-avail-extern, | |
| rpo-function-attrs, | |
| recompute-globalsaa, | |
| function<eager-inv>( | |
| float2int, | |
| lower-constant-intrinsics, | |
| loop( | |
| loop-rotate<header-duplication;no-prepare-for-lto>, | |
| loop-deletion | |
| ), | |
| loop-distribute, | |
| inject-tli-mappings, | |
| loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>, | |
| loop-load-elim, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch>, | |
| slp-vectorizer, | |
| vector-combine, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop-unroll<O2>, | |
| transform-warning, | |
| sroa<preserve-cfg>, | |
| instcombine<max-iterations=1000;no-use-loop-info>, | |
| loop-mssa( | |
| licm<allowspeculation> | |
| ), | |
| alignment-from-assumptions, | |
| loop-sink, | |
| instsimplify, | |
| div-rem-pairs, | |
| tailcallelim, | |
| simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch> | |
| ), | |
| globaldce, | |
| constmerge, | |
| cg-profile, | |
| rel-lookup-table-converter, | |
| function( | |
| annotation-remarks | |
| ), | |
| verify |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LLVM 18 changed it up a bit: