Silvius Rus - Re: Patch: New implementation of -Wstrict-aliasing (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] |
Other format: | [Raw text] |
- From: "Silvius Rus"
- To: "Gabriel Dos Reis"
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Feb 2007 12:25:26 -0800
- Subject: Re: Patch: New implementation of -Wstrict-aliasing
- References: 200701200222.l0K2MIvn031819@localhost.localdomain 45B2C523.6010808@google.com 878xfx2jv3.fsf@soliton.cs.tamu.edu 45BFC76B.6060504@google.com 87wt331z3m.fsf@soliton.cs.tamu.edu 45C1117A.1020807@google.com <87bqkeywer.fsf@soliton.cs.tamu.edu>
On 01 Feb 2007 05:01:00 -0600, Gabriel Dos Reis gdr@cs.tamu.edu wrote:
Do you have some data about the relative cost (in terms of compiler-time) of level 2 vs level 3? This is for decidiing which should be the default.
Hi Gaby,
The compile time difference from level 2 vs level 3 appears to be insignificant at both -O0 and -O2 (see timing results below). The only potential serious source of overhead would be the points-to based analysis, which only runs at -O2 or higher. However, the overhead turns out to be very low because the points-to information is highy preprocessed by pass_may_alias. The warning pass looks only at pointers that are both aliased and known to be dereferenced in the current function. Also, level 2 may end up looking at more conversion expressions because it does not check whether pointers are referenced, so in some cases level 2 could actually be slightly more expensive than level 3.
Let me know if you agree with default = level 3.
Is there a standard way to measure GCC's compilation overhead? Here are the timing results from building GMP on i686 (all times in seconds):
-O0: 54.069 -O0 -fstrict-aliasing: 54.948 -O0 -fstrict-aliasing -Wstrict-aliasing=2: 55.699 -O0 -fstrict-aliasing -Wstrict-aliasing=3: 55.657
-O2: 67.253 -O2 -fstrict-aliasing: 68.071 -O2 -fstrict-aliasing -Wstrict-aliasing=2: 68.852 -O2 -fstrict-aliasing -Wstrict-aliasing=3: 68.886
Many thanks for doing this. -- Gaby
I am happy to help. Silvius
- Follow-Ups:
- Re: Patch: New implementation of -Wstrict-aliasing
* From: Gabriel Dos Reis
- Re: Patch: New implementation of -Wstrict-aliasing
- References:
- Re: Patch: New implementation of -Wstrict-aliasing
* From: Gabriel Dos Reis
- Re: Patch: New implementation of -Wstrict-aliasing
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |