[RFC][PATCH] Extend store ccp
Richard Guenther
rguenther@suse.de
Tue Jun 19 21:22:00 GMT 2007
On Tue, 19 Jun 2007, Revital1 Eres wrote:
>
> Hello,
>
> Following previous review
> (http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01787.html); attached is
> the patch which enhance store ccp to propagate constants from stores to
> loads when the current implementation fails due to alias uncertainty;
>
> For example:
>
> S[5].x = 4;
> S[5].y = 0;
>
> x = S[5].x;
>
> ===>
>
> S[5].x = 4;
> S[5].y = 0;
>
> x = 4;
>
> This transformation extend the current implementation of the ccp propagator
> in two places:
Did you do any performance measurement to tell compile-time and
runtime effects of this patch? (if not, I suggest cc1files for
compile-time and SPEC for runtime effects)
Richard.
> 2007-06-19 Revital Eres <eres@il.ibm.com>
>
> * tree-ssa-ccp.c (visit_assignment): Call get_stmt_rhs_def_stmt
> while performing the propagation.
> * tree-ssa-propagate.c (do_store_ccp): New function.
> (add_edge): New function.
> (add_ssa_edge): Add an edge for every use by walking the virtual
> def-use chain.
> (get_stmt_rhs_def_stmt): New function to get
> the defining stmt of a use by walking the virtual use-def chain.
> (replace_vuses_in): Call get_stmt_rhs_def_stmt
> to perform the final replacement.
> * tree-ssa-propagate.h (get_stmt_rhs_def_stmt): Declare.
> * tree-flow.h (offset_overlaps_with_access): Declare.
>
> Comments are welcome.
> Thanks,
> Revital
>
>
> (See attached file: patch_ccp_19_6.txt)(See attached file: store_ccp-1.txt)
More information about the Gcc-patches
mailing list