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

--- Comment #6 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Wilco from comment #5)
> (In reply to Segher Boessenkool from comment #4)
> > That is code *size*.  Code size is expected to grow a tiny bit, because of
> > *better* register allocation.
> > 
> > But we could not do make_more_copies at -Os, if that helps?  (The hard
> > register
> > changes themselves are required for correctness).
> 
> Better register allocation implies lower average codesize due to fewer
> spills, fewer callee-saves, fewer moves etc.

That depends on the case.  And we are dealing with a quite specialised case
here.

> I still don't understand what specific problem make_more_copies is trying to
> solve. Is it trying to do life-range splitting of argument registers?

Nope.  It is simply that before the hard-reg change we very often combined the
argument register moves with other insns to something a different form than
those other insns, importantly when we can do this because we know how those
values are extended, etc.  make_more_copies simply inserts another reg-reg move
so that that new move can do this instead, since we no longer combine the hard
register move.  Without this we get a lot of actual code quality regressions.

Reply via email to