This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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]

Re: [PATCH] Fix PRs 8781 and 37892


On Fri, Apr 3, 2009 at 7:36 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> This fixes value-numbering and phi-translation to simplify the VNs
> reference operands if we substitute &foobar into the address SSA name
> of an indirect reference. ?This allows the same optimization as
> phiprop does during PRE and also allows chaining of redundant
> load elminiation like for the PR8781 testcase for which I also
> added folding indirect calls to direct ones (otherwise we have to
> wait for DOM which is supposed to go away anyway).
>
> Bootstrapped on x86_64-unknown-linux-gnu, regtests still running.
>
> I want to sneak this in before Danny re-writes the VN again ;)
>
> Thanks,
> Richard.
>
> 2009-04-03 ?Richard Guenther ?<rguenther@suse.de>
>
> ? ? ? ?PR tree-optimization/8781
> ? ? ? ?PR tree-optimization/37892
> ? ? ? ?* tree-ssa-sccvn.h (vn_reference_fold_indirect): Declare.
> ? ? ? ?* tree-ssa-sccvn.c (vn_reference_fold_indirect): New function.
> ? ? ? ?(valueize_refs): Call it for *& valueizations.
> ? ? ? ?(shared_reference_ops_from_ref): Rename to ...
> ? ? ? ?(valueize_shared_reference_ops_from_ref): ... this and valueize.
> ? ? ? ?(shared_reference_ops_from_call): Rename to ...
> ? ? ? ?(valueize_shared_reference_ops_from_call): ... this and valueize.
> ? ? ? ?(vn_reference_lookup): Update.
> ? ? ? ?(visit_reference_op_call): Likewise.
> ? ? ? ?* tree-ssa-pre.c (phi_translate_1): Fold *&.
> ? ? ? ?(eliminate): Value-replace the call address in call statements.
>
> ? ? ? ?* g++.dg/tree-ssa/pr8781.C: New testcase.
> ? ? ? ?* gcc.dg/tree-ssa/ssa-pre-25.c: Likewise.
>

This breaks SPEC CPU 2K/2006 and may be others:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39650
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39648

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]