From: Jan Hubicka Date: Mon, 8 Nov 2021 17:38:09 +0000 (+0100) Subject: Move uncprop after modref X-Git-Tag: basepoints/gcc-13~3309 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=666d780426f39883db8362f5cc24cdf9b4d3e98d;p=thirdparty%2Fgcc.git Move uncprop after modref moveS uncprop after modref and pure/const pass and adds a comment that this pass should alwasy be last since it is only supposed to help PHI lowering. The pass replaces constant by SSA names that are known to be constant at the place which hardly helps other passes. gcc/ChangeLog: PR tree-optimization/103177 * passes.def: Move uncprop after pure/const and modref. --- diff --git a/gcc/passes.def b/gcc/passes.def index 0f541454e7f1..56dab80a0296 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -360,9 +360,11 @@ along with GCC; see the file COPYING3. If not see number of false positives from it. */ NEXT_PASS (pass_split_crit_edges); NEXT_PASS (pass_late_warn_uninitialized); - NEXT_PASS (pass_uncprop); NEXT_PASS (pass_local_pure_const); NEXT_PASS (pass_modref); + /* uncprop replaces constants by SSA names. This makes analysis harder + and thus it should be run last. */ + NEXT_PASS (pass_uncprop); POP_INSERT_PASSES () NEXT_PASS (pass_all_optimizations_g); PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations_g) @@ -393,9 +395,11 @@ along with GCC; see the file COPYING3. If not see number of false positives from it. */ NEXT_PASS (pass_split_crit_edges); NEXT_PASS (pass_late_warn_uninitialized); - NEXT_PASS (pass_uncprop); NEXT_PASS (pass_local_pure_const); NEXT_PASS (pass_modref); + /* uncprop replaces constants by SSA names. This makes analysis harder + and thus it should be run last. */ + NEXT_PASS (pass_uncprop); POP_INSERT_PASSES () NEXT_PASS (pass_tm_init); PUSH_INSERT_PASSES_WITHIN (pass_tm_init)