Sorry for the slow reply. Omar Tahir <omar.ta...@arm.com> writes: >> 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 :-) > > That's a good point. A few other passes call functions that make use of > the moveable pseudo variables. But if they're before IRA then they should > be zero, and as you say if they're after IRA then there are no pseudos left! > > I've moved the reset to the end of move_unallocated_pseudos. Unfortunately I > can't inline the patch as there's a form feed (^L) that's mangling the text, > not sure how to get around that.
Thanks, pushed to master. Richard