This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: (-Os versus -O2 relation) Was: case where gcc generates bigger binaries than MSVC
- To: Mike Stump <mrs at windriver dot com>
- Subject: Re: (-Os versus -O2 relation) Was: case where gcc generates bigger binaries than MSVC
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 11 May 2000 15:23:03 -0600
- cc: egcs at egcs dot cygnus dot com, jh at suse dot cz, mat at lcs dot mit dot edu
- Reply-To: law at cygnus dot com
In message <200005112015.NAA06576@kankakee.wrs.com>you write:
> > Date: Thu, 11 May 2000 10:25:16 +0200
> > From: Jan Hubicka <jh@suse.cz>
> > To: egcs@egcs.cygnus.com, law@cygnus.com, mat@lcs.mit.edu
>
> > I am not sure about DATA_ALIGNMENT. The decision IMO that needs to
> > be made is whether we want -O2 and -Os code to be combined.
>
> There are alignments that are mandated by the ABI, don't follow them,
> and there isn't compatibility. Those cannot change with -Os. The
> optional/extra alignments that don't interfere (except with
> performance) with interworking of ABI compliant code, should be
> affected by -Os.
>
> If gcc smears these two cases together in a port file, then we need to
> unsmear them and expose the difference to the compiler. We could try
> and have the port files make use of the -Os flag, but in the end, I
> don't think that would be better.
Any port which uses DATA_ALIGNMENT or CONSTANT_ALIGNMENT to handle ABI
mandated alignments is broken. There are other mechanisms for handling
required alignments.
jeff