diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-23 22:15:44 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-23 22:15:44 +0000 |
commit | 148868c2e9f5b13656deb146de17da38caabb4be (patch) | |
tree | 8d92d245884dcaaec6f1a21587453ca22b42f78a /gcc/haifa-sched.c | |
parent | 186232709456584c16d67703bbbe5a969bcd1574 (diff) | |
download | gcc-148868c2e9f5b13656deb146de17da38caabb4be.tar.gz |
PR bootstrap/52287
* haifa-sched.c (rank_for_schedule): Stabilize sort for debug insns.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184531 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r-- | gcc/haifa-sched.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index b6a8b0c8884..09c6af22d43 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -1647,8 +1647,10 @@ rank_for_schedule (const void *x, const void *y) /* Schedule debug insns as early as possible. */ if (DEBUG_INSN_P (tmp) && !DEBUG_INSN_P (tmp2)) return -1; - else if (DEBUG_INSN_P (tmp2)) + else if (!DEBUG_INSN_P (tmp) && DEBUG_INSN_P (tmp2)) return 1; + else if (DEBUG_INSN_P (tmp) && DEBUG_INSN_P (tmp2)) + return INSN_LUID (tmp) - INSN_LUID (tmp2); } /* The insn in a schedule group should be issued the first. */ |