From: Tom de Vries Date: Mon, 3 Jul 2017 07:23:01 +0000 (+0000) Subject: Ignore EDGE_{DFS_BACK,EXECUTABLE} in tail-merge X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be086ff50c79270411f14eec2d8f02c2b5bdb322;p=gcc.git Ignore EDGE_{DFS_BACK,EXECUTABLE} in tail-merge 2017-07-03 Tom de Vries PR tree-optimization/69468 * tree-ssa-tail-merge.c (ignore_edge_flags): New constant. (find_same_succ_bb): Handle ignore_edge_flags. * gcc.dg/pr81192.c: Update. From-SVN: r249895 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 18f23c09f31..c95a82fd351 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-07-03 Tom de Vries + + PR tree-optimization/69468 + * tree-ssa-tail-merge.c (ignore_edge_flags): New constant. + (find_same_succ_bb): Handle ignore_edge_flags. + 2017-07-03 Tom de Vries PR tree-optimization/81192 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 12d441eb010..c52c7a83814 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-07-03 Tom de Vries + + PR tree-optimization/69468 + * gcc.dg/pr81192.c: Update. + 2017-07-03 Tom de Vries PR tree-optimization/81192 diff --git a/gcc/testsuite/gcc.dg/pr81192.c b/gcc/testsuite/gcc.dg/pr81192.c index 8b3a77a6061..57eb4781d4d 100644 --- a/gcc/testsuite/gcc.dg/pr81192.c +++ b/gcc/testsuite/gcc.dg/pr81192.c @@ -19,4 +19,4 @@ fn2 (void) ; } -/* { dg-final { scan-tree-dump-not "(?n)find_duplicates: duplicate of " "pre" } } */ +/* { dg-final { scan-tree-dump-times "(?n)find_duplicates: duplicate of " 1 "pre" } } */ diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c index 6fa4e5b2ad9..b11911b7f1e 100644 --- a/gcc/tree-ssa-tail-merge.c +++ b/gcc/tree-ssa-tail-merge.c @@ -207,6 +207,8 @@ along with GCC; see the file COPYING3. If not see #include "tree-eh.h" #include "tree-cfgcleanup.h" +const int ignore_edge_flags = EDGE_DFS_BACK | EDGE_EXECUTABLE; + /* Describes a group of bbs with the same successors. The successor bbs are cached in succs, and the successor edge flags are cached in succ_flags. If a bb has the EDGE_TRUE/FALSE_VALUE flags swapped compared to succ_flags, @@ -707,7 +709,7 @@ find_same_succ_bb (basic_block bb, same_succ **same_p) { int index = e->dest->index; bitmap_set_bit (same->succs, index); - same_succ_edge_flags[index] = e->flags; + same_succ_edge_flags[index] = (e->flags & ~ignore_edge_flags); } EXECUTE_IF_SET_IN_BITMAP (same->succs, 0, j, bj) same->succ_flags.safe_push (same_succ_edge_flags[j]);