OSDN Git Service

PR rtl-optimization/49900
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Aug 2011 18:22:36 +0000 (18:22 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Aug 2011 18:22:36 +0000 (18:22 +0000)
* sched-ebb.c (add_deps_for_risky_insns): Also add dependencies to
ensure basic blocks stay in the same order.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177475 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/sched-ebb.c

index 2e897ae..ba172aa 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 726c7c6..ca0e144 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)