Revert
authorJeff Law <law@redhat.com>
Sun, 28 Feb 2016 06:34:20 +0000 (23:34 -0700)
committerJeff Law <law@gcc.gnu.org>
Sun, 28 Feb 2016 06:34:20 +0000 (23:34 -0700)
2016-02-26  Richard Biener  <rguenther@suse.de>
    Jeff Law  <law@redhat.com>

PR tree-optimization/69740
* cfghooks.c (remove_edge): Request loop fixups if we delete
an edge that might turn an irreducible loop into a natural
loop.

Revert
2016-02-26  Richard Biener  <rguenther@suse.de>
    Jeff Law  <law@redhat.com>

PR tree-optimization/69740
* gcc.c-torture/compile/pr69740-1.c: New test.
* gcc.c-torture/compile/pr69740-2.c: New test.

From-SVN: r233787

gcc/ChangeLog
gcc/cfghooks.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr69740-1.c [deleted file]
gcc/testsuite/gcc.c-torture/compile/pr69740-2.c [deleted file]

index 57a81f3de864b1c90eac7d9dd9302c74ccf839b2..85c6301bf6d0de8c1c5e3ae90366025c37b41bad 100644 (file)
@@ -1,3 +1,14 @@
+2016-02-27  Jeff Law  <law@redhat.com>
+
+       Revert
+       2016-02-26  Richard Biener  <rguenther@suse.de>
+                   Jeff Law  <law@redhat.com>
+
+       PR tree-optimization/69740
+       * cfghooks.c (remove_edge): Request loop fixups if we delete
+       an edge that might turn an irreducible loop into a natural
+       loop.
+
 2016-02-27  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/69896
index 06c05d1fb39a6146de45ac0b71fda31284fb3994..bbb1017fd1f951637314ce3a8e145acdb7f078d5 100644 (file)
@@ -408,20 +408,7 @@ void
 remove_edge (edge e)
 {
   if (current_loops != NULL)
-    {
-      rescan_loop_exit (e, false, true);
-
-      /* Removal of an edge inside an irreducible region or which leads
-        to an irreducible region can turn the region into a natural loop.
-        In that case, ask for the loop structure fixups.
-
-        FIXME: Note that LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS is not always
-        set, so always ask for fixups when removing an edge in that case.  */
-      if (!loops_state_satisfies_p (LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS)
-         || (e->flags & EDGE_IRREDUCIBLE_LOOP)
-         || (e->dest->flags & BB_IRREDUCIBLE_LOOP))
-       loops_state_set (LOOPS_NEED_FIXUP);
-    }
+    rescan_loop_exit (e, false, true);
 
   /* This is probably not needed, but it doesn't hurt.  */
   /* FIXME: This should be called via a remove_edge hook.  */
index 2c2102e962f2c4747216b5eb792eaf9160c9fc4a..c809e2ca8eb3846239f98ae8d86533698468f204 100644 (file)
@@ -1,3 +1,13 @@
+2016-02-27  Jeff Law  <law@redhat.com>
+
+       Revert
+       2016-02-26  Richard Biener  <rguenther@suse.de>
+                   Jeff Law  <law@redhat.com>
+
+       PR tree-optimization/69740
+       * gcc.c-torture/compile/pr69740-1.c: New test.
+       * gcc.c-torture/compile/pr69740-2.c: New test.
+
 2016-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR fortran/69910
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr69740-1.c b/gcc/testsuite/gcc.c-torture/compile/pr69740-1.c
deleted file mode 100644 (file)
index ac867d8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-char a;
-short b;
-void fn1() {
-  if (b)
-    ;
-  else {
-    int c[1] = {0};
-  l1:;
-  }
-  if (a)
-    goto l1;
-}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr69740-2.c b/gcc/testsuite/gcc.c-torture/compile/pr69740-2.c
deleted file mode 100644 (file)
index a89c9a0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-inline int foo(int *p1, int p2) {
-  int z = *p1;
-  while (z > p2)
-    p2 = 2;
-  return z;
-}
-int main() {
-  int i;
-  for (;;) {
-    int j, k;
-    i = foo(&k, 7);
-    if (k)
-      j = i;
-    else
-      k = j;
-    if (2 != j)
-      __builtin_abort();
-  }
-}