This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add -fsection-anchors (4.2 project)
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: richard at codesourcery dot com (Richard Sandiford)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 2 Feb 2006 11:22:42 -0500 (EST)
- Subject: Re: Add -fsection-anchors (4.2 project)
> This is the main part for the 4.2 section anchor project:
>
> http://gcc.gnu.org/wiki/Section%20Anchor%20Optimisations
>
> The idea is to introduce anchor symbols that can be used to access
> several nearby objects. For example, if we have:
>
> static int a, b, c;
> int foo (void) { return a + b + c; }
>
> gcc will normally perform separate symbolic address calculations for
> "a", "b" and "c". The idea of this patch is to introduce a new anchor
> symbol and access "a", "b" and "c" relative to that anchor.
>
> The main motivation is to reduce GOT size, but the patch also has
> the potential to make some code faster. SPEC results are attached
> and described below.
First I want to say thanks for doing this optimization.
Second, this should fix PR 17106 which is actually asking for
this optimization.
> The only extra failures were in objc:
>
> FAIL: objc/execute/class-13.m compilation
> FAIL: objc/execute/class-6.m compilation
> FAIL: objc/execute/object_is_class.m compilation
> FAIL: objc/execute/object_is_meta_class.m compilation
>
> (options snipped). These failures are caused by objc creating two decls
> for _OBJC_METACLASS_* objects. I think it would be better to modify the
> old decl once the initialiser is known, but I don't know enough about
> objc to do that.
Thrid, give me a few days to debug this. If your patch is approved make sure that these
tests get xfailed and a bug(s) filed for this regression.
Thanks,
Andrew Pinski