[tree-if-conv.c] Move call to ifcvt_local_dce after rpo vn

Message ID CAAgBjMkVqrcy-22Z=XxvUk2BB7-H0Xug42t+Ei4UzwhvpRO-6g@mail.gmail.com
State New
Headers show
Series
  • [tree-if-conv.c] Move call to ifcvt_local_dce after rpo vn
Related show

Commit Message

Prathamesh Kulkarni Oct. 1, 2019, 5:14 p.m.
Hi,
The attached patch is committed to trunk after bootstrap+test on
x86_64-unknown-linux-gnu.
Pre-approved by Richard.

Thanks,
Prathamesh

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 276416)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2019-10-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
+
+	* tree-if-conv.c (tree_if_conversion): Move call to ifcvt_local_dce
+	after local CSE.
+
 2019-10-01  Jan Hubicka  <hubicka@ucw.cz>
 
 	* doc/invoke.texi (early-inlining-insns-O2): Document.
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c	(revision 276416)
+++ tree-if-conv.c	(working copy)
@@ -3060,9 +3060,6 @@ 
      on-the-fly.  */
   combine_blocks (loop);
 
-  /* Delete dead predicate computations.  */
-  ifcvt_local_dce (loop->header);
-
   /* Perform local CSE, this esp. helps the vectorizer analysis if loads
      and stores are involved.  CSE only the loop body, not the entry
      PHIs, those are to be kept in sync with the non-if-converted copy.
@@ -3071,6 +3068,9 @@ 
   bitmap_set_bit (exit_bbs, single_exit (loop)->dest->index);
   bitmap_set_bit (exit_bbs, loop->latch->index);
   todo |= do_rpo_vn (cfun, loop_preheader_edge (loop), exit_bbs);
+
+  /* Delete dead predicate computations.  */
+  ifcvt_local_dce (loop->header);
   BITMAP_FREE (exit_bbs);
 
   todo |= TODO_cleanup_cfg;