sched-rgn.c (add_branch_dependences): Keep insns in a SCHED_GROUP at the end of BB...
authorWei Mi <wmi@google.com>
Mon, 4 Nov 2013 21:45:05 +0000 (21:45 +0000)
committerWei Mi <wmi@gcc.gnu.org>
Mon, 4 Nov 2013 21:45:05 +0000 (21:45 +0000)
2013-11-04  Wei Mi  <wmi@google.com>

        * sched-rgn.c (add_branch_dependences): Keep insns in
        a SCHED_GROUP at the end of BB to remain their location.

From-SVN: r204371

gcc/ChangeLog
gcc/sched-rgn.c

index 895da5a9bd96df5a6868a342424dc8df349020de..4d08af4519807933d5001806f1bd8b75112d5734 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-04  Wei Mi  <wmi@google.com>
+
+       * sched-rgn.c (add_branch_dependences): Keep insns in
+       a SCHED_GROUP at the end of BB to remain their location.
+
 2013-11-04  Wei Mi  <wmi@google.com>
 
        * gcc/config/i386/i386.c (memory_address_length): Extract a part
index bf9b10df3a99caf0c3133070f7bc591d66bf372d..73a236b5929a3e08e3cdbfa7f23fa35533f6d976 100644 (file)
@@ -2443,6 +2443,8 @@ add_branch_dependences (rtx head, rtx tail)
      cc0 setters remain at the end because they can't be moved away from
      their cc0 user.
 
+     Predecessors of SCHED_GROUP_P instructions at the end remain at the end.
+
      COND_EXEC insns cannot be moved past a branch (see e.g. PR17808).
 
      Insns setting TARGET_CLASS_LIKELY_SPILLED_P registers (usually return
@@ -2465,7 +2467,8 @@ add_branch_dependences (rtx head, rtx tail)
 #endif
                 || (!reload_completed
                     && sets_likely_spilled (PATTERN (insn)))))
-        || NOTE_P (insn))
+        || NOTE_P (insn)
+        || (last != 0 && SCHED_GROUP_P (last)))
     {
       if (!NOTE_P (insn))
        {