On Fri, Mar 07, 2025 at 07:36:29PM +0800, H.J. Lu wrote:
> > >       /* push is 1 byte while typical spill is 4-5 bytes.
> > >          ??? We probably should adjust size costs accordingly.
> > >          Costs are relative to reg-reg move that has 2 bytes for 32bit
> > >          and 3 bytes otherwise.  Be sure that no cost table sets cost
> > >          to 2, so we end up with 0.  */

The last sentence of comment doesn't match what the code does.
So perhaps write Make sure not to return cost less than 1. or so.

> > >       if (mem_cost <= 2 || optimize_function_for_size_p (cfun))
> > >         return 1;
> > >       return mem_cost - 2;
> > >     }

And of course wait for Honza's or Uros's review.

        Jakub

Reply via email to