diff options
author | Andrey Belevantsev <abel@ispras.ru> | 2011-01-13 12:29:09 +0300 |
---|---|---|
committer | Andrey Belevantsev <abel@gcc.gnu.org> | 2011-01-13 12:29:09 +0300 |
commit | 9b0f04e708f22d60c2093354798db28641e982a1 (patch) | |
tree | cb941e6d58e77747c98467338a3b6ee849918d99 /gcc/sel-sched.c | |
parent | 1ee3ea052a68c68016ddb19efa9c6173fecf9c80 (diff) | |
download | gcc-9b0f04e708f22d60c2093354798db28641e982a1.zip gcc-9b0f04e708f22d60c2093354798db28641e982a1.tar.gz gcc-9b0f04e708f22d60c2093354798db28641e982a1.tar.bz2 |
re PR rtl-optimization/45352 (ICE: in reset_sched_cycles_in_current_ebb, at sel-sched.c:7058)
PR rtl-optimization/45352
* sel-sched.c: Update copyright years.
(reset_sched_cycles_in_current_ebb): Also recheck the DFA state
in the advancing loop when we have issued issue_rate insns.
* gcc.dg/pr45352-3.c: New.
From-SVN: r168742
Diffstat (limited to 'gcc/sel-sched.c')
-rw-r--r-- | gcc/sel-sched.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 791adf1..d40885c 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -1,5 +1,6 @@ /* Instruction scheduling pass. Selective scheduler and pipeliner. - Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 + Free Software Foundation, Inc. This file is part of GCC. @@ -6988,7 +6989,7 @@ reset_sched_cycles_in_current_ebb (void) { int cost, haifa_cost; int sort_p; - bool asm_p, real_insn, after_stall; + bool asm_p, real_insn, after_stall, all_issued; int clock; if (!INSN_P (insn)) @@ -7024,8 +7025,8 @@ reset_sched_cycles_in_current_ebb (void) haifa_cost = cost; after_stall = 1; } - if (haifa_cost == 0 - && issued_insns == issue_rate) + all_issued = issued_insns == issue_rate; + if (haifa_cost == 0 && all_issued) haifa_cost = 1; if (haifa_cost > 0) { @@ -7053,11 +7054,12 @@ reset_sched_cycles_in_current_ebb (void) break; /* When the data dependency stall is longer than the DFA stall, - it could be that after the longer stall the insn will again + and when we have issued exactly issue_rate insns and stalled, + it could be that after this longer stall the insn will again become unavailable to the DFA restrictions. Looks strange but happens e.g. on x86-64. So recheck DFA on the last iteration. */ - if (after_stall + if ((after_stall || all_issued) && real_insn && haifa_cost == 0) haifa_cost = estimate_insn_cost (insn, curr_state); |