summaryrefslogtreecommitdiff
path: root/gcc/sched-rgn.c
diff options
context:
space:
mode:
authorwmi <wmi@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-04 21:45:05 +0000
committerwmi <wmi@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-04 21:45:05 +0000
commit681b96094339370ddc969d9a2eb5fe4e5323ac29 (patch)
treef54f2a607e3215d37070108ae88eeaed39ffb738 /gcc/sched-rgn.c
parent641b578b37faf7865a6d1e63064c86b5dbc91425 (diff)
downloadgcc-681b96094339370ddc969d9a2eb5fe4e5323ac29.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204371 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r--gcc/sched-rgn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index bf9b10df3a9..73a236b5929 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -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))
{