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: Jan Hubicka <jh at suse dot cz>
- Subject: Re: (-Os versus -O2 relation) Was: case where gcc generates bigger binaries than MSVC
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Thu, 11 May 2000 21:19:40 -0400
- Cc: egcs at egcs dot cygnus dot com, law at cygnus dot com, mat at lcs dot mit dot edu
- References: <20000511102516.A19337@atrey.karlin.mff.cuni.cz>
On Thu, May 11, 2000 at 10:25:16AM +0200, Jan Hubicka wrote:
> 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.
> At XaoS I compile main engine with -O2 and user interface with -Os.
> In case the static storage comming from -Os will be missaligned, we will
> get penalty on -O2 code.
DATA_ALIGNMENT and CONSTANT_ALIGNMENT are to add to the alignment to make
things more cache friendly, particularly in aligning the 31-byte string that is
strcpy'ed in dhrystone 2.1 so that RISC machines can do word load/stores
instead of byte load/stores. By the way, on machines that don't have the
equivalent of REP MOVS, making DATA_ALIGNMENT and CONSTANT_ALIGNMENT smaller
will actually make the text space larger (if the alignment allows a string to
be put on a word or double word boundary, and you are moving into a suitablly
aligned structure, you need fewer loads and stores).
--
Michael Meissner, Cygnus Solutions, a Red Hat company.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482