New assert in haifa-sched.c

Maxim Kuvyrkov maxim@codesourcery.com
Sun Sep 7 11:58:00 GMT 2008


Adam Nemet wrote:
> Maxim Kuvyrkov writes:
>> I'm not 100% sure about current state of things, considering recent 
>> merge of sel-sched, but before that it was:
>>
>> set_priorities() -> priority() -> dep_cost() -> recog_memoized().
> 
> I don't think that was the case for all insns even before the patch.  The only
> new thing is the assert which now catches this.
> 
> If the consumer is an asm just like in gcc.dg/tree-ssa/stdarg-2.c:f10() then
> we would not call recog on the producer inside dep_cost*.
> 
> The patch below fixes the issue for me.  I am going to test this if it looks
> good to people.

I think a cleaner way would be to call recog_memoized() from within 
sched_init().  There's no ideal place to put call to recog_memoized() at 
the moment, but something like init_h_i_d() seems to be a better choice 
for initializing INSN_CODE() than dep_cost().

As far as your patch goes, I think it's ok (I'm not the maintainer, though).

--
Maxim



More information about the Gcc mailing list