From a22449bd7ddb0b63d0bc5af14a4a9ae272eb8fd8 Mon Sep 17 00:00:00 2001 From: Wei Mi Date: Mon, 4 Nov 2013 21:45:05 +0000 Subject: [PATCH] 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 * 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 | 5 +++++ gcc/sched-rgn.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 895da5a9bd9..4d08af45198 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-11-04 Wei Mi + + * 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 * gcc/config/i386/i386.c (memory_address_length): Extract a part 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)) { -- 2.30.2