On Jun 2, 2014, at 7:54 PM, Andreas Schwab <sch...@linux-m68k.org> wrote:
> Regtested on ia64-suse-linux and installed as obvious. > > Andreas. > > * config/ia64/ia64.c > (ia64_first_cycle_multipass_dfa_lookahead_guard): Check > pending_data_specs first. > > diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c > index 118e5bf..4c5390b 100644 > --- a/gcc/config/ia64/ia64.c > +++ b/gcc/config/ia64/ia64.c > @@ -7536,7 +7536,7 @@ ia64_first_cycle_multipass_dfa_lookahead_guard (rtx > insn, int ready_index) > > /* Size of ALAT is 32. As far as we perform conservative > data speculation, we keep ALAT half-empty. */ > - if ((TODO_SPEC (insn) & BEGIN_DATA) && pending_data_specs >= 16) > + if (pending_data_specs >= 16 && (TODO_SPEC (insn) & BEGIN_DATA)) > return ready_index == 0 ? -1 : 1; > > if (ready_index == 0) Thanks for fixing this. To make it a bit more robust I would suggest using same condition as in ia64_variable_issue(): === if (sched_deps_info->generate_spec_deps && !sel_sched_p ()) /* Modulo scheduling does not extend h_i_d when emitting new instructions. Don't use h_i_d, if we don't have to. */ { if (DONE_SPEC (insn) & BEGIN_DATA) pending_data_specs++; if (CHECK_SPEC (insn) & BEGIN_DATA) pending_data_specs--; } === The underlaying problem is that TODO_SPEC(insn) should not be accessed for sel-sched. Because pending_data_specs turns out to always be null during sel-sched, "pending_data_specs >= 16" can be used as a shorthand for "sched_deps_info->generate_spec_deps && !sel_sched_p () && pending_data_specs >= 16" -- Maxim Kuvyrkov www.linaro.org