https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017

--- Comment #10 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #6)
> Right, that's why we need to add the copies before RA, so we don't have to
> look for unused regs.  But we don't want to add the copies too early just
> for the optimizer to remove them on us.

RA itself will want to use the same hard register most of the time, already.
And that *is* the best choice, except when you need to split the range later.

We would need to do (some of) shrink wrapping before RA, but that means we
need to change our abstraction of prologue/epilogue.  Not a bad idea probably,
but a lot of work.  Many targets do many special things in their own *logue
hooks (and patterns and code called from those) currently, it all would need
to be disentangled.

Reply via email to