On 7/12/2012, at 1:31 AM, Steven Bosscher wrote: > Hello, > > The problem in this PR is that new basic blocks can be created if the > scheduler moves speculative insns and adds recovery code, but the > bb_state* arrays are allocated only at the start of scheduling a > region and are not set up to deal with changing last_basic_block. > > Fixed by resizing the arrays if necessary. This fixes most of the > testsuite failures on ia64:
The patch is OK, [though I'm not an official scheduler reviewer]. A single nit-pick below. ... > +static void > +realloc_bb_state_array (int saved_last_basic_block) > +{ > + char *old_bb_state_array = bb_state_array; > + size_t lbb = (size_t) last_basic_block; > + size_t slbb = (size_t) saved_last_basic_block; > + > + /* Nothing to do if nothing changed since the last time this was called. > */ > + if (saved_last_basic_block == last_basic_block) > + return; > + > + /* The selective scheduler doesn't use the state arrays. */ > + if (sel_sched_p ()) Would you please add "gcc_assert (bb_state_array == NULL && bb_state == NULL);" here just to be safe. > + return; > + > + gcc_checking_assert (saved_last_basic_block == 0 > + || (bb_state_array != NULL && bb_state != NULL)); > + Thanks, -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics