]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Move uncprop after modref
authorJan Hubicka <hubicka@ucw.cz>
Mon, 8 Nov 2021 17:38:09 +0000 (18:38 +0100)
committerJan Hubicka <hubicka@ucw.cz>
Mon, 8 Nov 2021 17:38:09 +0000 (18:38 +0100)
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

index 0f541454e7f11f85815bfe0be1b951d3ee9bdd56..56dab80a02968ea53905399b621c47ea2cc8d1bc 100644 (file)
@@ -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)