This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


On Tue, 23 Oct 2001, Jan Hubicka wrote:

> > On Tue, 23 Oct 2001, Jan Hubicka wrote:
> > 
> > > > One of our customers complained about the additional code generated to
> > > > maintain the stack aligned to 16-byte boundaries, and suggested us to
> > > > default to the minimum alignment when optimizing for code size.  This
> > > 
> > > Problem of this sollution is combining -Os modules with -O2.  It makes sense
> > > to compile internal loop by -O2/-O3 and rest with -Os.  I am doing that in
> > > XaoS zoomer to avoid bloat from user interface and it works well.
> > 
> > Then use -Os -mpreferred-stack-boundary=3.
> But then I need to make Makefiles platform and gcc version depdndent.

That's what autoconf is for.

> I believe we should try to push users of gcc to use -Os for most of code
> that is not perofmrance critical, as code size is currently one of the main
> bottlenecks and making combining of -Os and -O2 code dificult is not going
> to help it.

Most code also doesn't need stack alignment > 4 bytes, so it can just use -Os
without worrying about this issue.


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]