Omar Tahir <omar.ta...@arm.com> writes:
> Hi Richard,
>
> From: Richard Sandiford <richard.sandif...@arm.com>
>> > @@ -3719,6 +3722,7 @@ static unsigned int rest_of_handle_sched (void) 
>> > { #ifdef INSN_SCHEDULING
>> > +  first_moveable_pseudo = last_moveable_pseudo;
>> >    if (flag_selective_scheduling
>> >        && ! maybe_skip_selective_scheduling ())
>> >      run_selective_scheduling ();
>> 
>> I think instead we should zero out both variables at the end of IRA.
>> There are other places besides the scheduler that call into the IRA code, so 
>> tackling the problem there seems more general.
>
> If you zero first_moveable_pseudo and last_moveable_pseudo after IRA then
> they'll be zero for the second scheduler pass, which uses them.

Are you sure?  It shouldn't be doing that, since there are no pseudos
left when the second scheduling pass runs.  RA replaces all pseudos
with hard registers.

So if the values in the variables has a noticeable effect on sched2,
I think that's even more reason to clear them after IRA :-)

Thanks,
Richard

Reply via email to