From 666d780426f39883db8362f5cc24cdf9b4d3e98d Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 8 Nov 2021 18:38:09 +0100 Subject: [PATCH] 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. --- gcc/passes.def | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.47.2