re PR rtl-optimization/49900 (ICE in advance_target_bb, at sched-ebb.c:691)
authorBernd Schmidt <bernds@codesourcery.com>
Fri, 5 Aug 2011 18:22:36 +0000 (18:22 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Fri, 5 Aug 2011 18:22:36 +0000 (18:22 +0000)
PR rtl-optimization/49900
* sched-ebb.c (add_deps_for_risky_insns): Also add dependencies to
ensure basic blocks stay in the same order.

From-SVN: r177475

gcc/ChangeLog
gcc/sched-ebb.c

index 2e897ae8cd981c6e67e4477bcda2826e56e9a91e..ba172aa6dce1496ea29a0e6adfed290a576bdd86 100644 (file)
@@ -1,3 +1,9 @@
+2011-08-05  Bernd Schmidt  <bernds@codesourcery.com>
+
+       PR rtl-optimization/49900
+       * sched-ebb.c (add_deps_for_risky_insns): Also add dependencies to
+       ensure basic blocks stay in the same order.
+
 2011-08-05  Aldy Hernandez  <aldyh@redhat.com>
 
        * config/s390/s390.c (s390_expand_cs_hqi): Add new arguments to
index 726c7c62511271cc948aa5f6c04be83fc0216217..ca0e1441275590a2e38926bd12fb547e989655d7 100644 (file)
@@ -397,6 +397,9 @@ add_deps_for_risky_insns (rtx head, rtx tail)
          bb = BLOCK_FOR_INSN (insn);
          bb->aux = last_block;
          last_block = bb;
+         /* Ensure blocks stay in the same order.  */
+         if (last_jump)
+           add_dependence (insn, last_jump, REG_DEP_ANTI);
          last_jump = insn;
        }
       else if (INSN_P (insn) && last_jump != NULL_RTX)