This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- From: Ian Lance Taylor <iant at google dot com>
- To: bkorb at gnu dot org
- Cc: Daniel Berlin <dberlin at dberlin dot org>, gcc at gcc dot gnu dot org
- Date: 01 Jan 2007 16:37:36 -0800
- Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
- References: <200612300047.kBU0lFwk014817@localhost.localdomain> <87lkkosz1n.fsf@penguin.cs.ucla.edu> <45970416.80407@adacore.com> <8764bssikm.fsf@penguin.cs.ucla.edu> <571f6b510612310047r3b7ef9acl4a0ab082e88e17a3@mail.gmail.com> <87bqlkmm3r.fsf@penguin.cs.ucla.edu> <4aca3dc20612310641n78e8898euf1c003444e2303eb@mail.gmail.com> <45980964.7000406@gnu.org> <4aca3dc20612311617q6772a0f0saa1633ec0f9be76b@mail.gmail.com> <459895A3.1020509@gnu.org> <4aca3dc20701010627j7df4c0a8t4c14cb23be0c294f@mail.gmail.com> <45998055.3060601@gnu.org>
Bruce Korb <bkorb@gnu.org> writes:
> WRT strict aliasing, I've never seen any data that indicated that the
> language change was compelling. Consequently, as best I can tell it
> was a marginal optimization improvement. So, I doubt its value.
> Still, it should have had compiler warnings in advance.
I've seen programs that doubled in speed when strict aliasing was
turned on.
You won't see this effect on an x86, since all current x86
implementations are out-of-order processors. You can think of an
out-of-order processor as doing on-the-fly perfectly accurate alias
analysis.
For in-order processors with complex scheduling requirements, strict
aliasing can make a dramatic difference in execution time, because it
give the compiler considerable freedom to reorder loads and stores.
Ian