Arranging for -Os to imply -mpreferred-stack-boundary=2 on x86

Jan Hubicka jh@suse.cz
Tue Oct 23 06:30:00 GMT 2001


> > I'm considering introducing a function attribute to specify the
> > alignment requirements of a given function, with similar effects to
> > RTH's FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN, so that one can control
> > performance-critical (re-)entry points that would benefit from
> > additional alignment.  I suppose this would address most of the
> > concerns discussed in the long thread starting at
> > http://gcc.gnu.org/ml/gcc/2001-07/msg00404.html .  Comments?
> > 
> > Meanwhile, is this ok to install?  Build- and hand-tested on
> > athlon-pc-linux-gnu.
> 
> Ok.  I'd still like us to default to a boundary of 2, but I doubt we'll
> achieve consensus on that.

Also note that I do have patches somewhere to compute alignment required
by given function after reload and use the value when compiling later
calls to that function.

It did have pretty good effect on removing the preferred-stack-boundary
problems.  If it appears to make sense, I can try to re-implement it for
new attribute scheme
(there has been problem where to store the information.  I can invent
the "internal attribute" preferred_stack_boundary and use it for that
purpose).

Honza
> 
> 
> Bernd



More information about the Gcc-patches mailing list