[PATCH] Extend store ccp
Fri Mar 23 12:10:00 GMT 2007
> You confused me a lot in that you use a name for get_def_of_stmt_rhs ()
> that doesn't look like it checks for a single constant value ;) Maybe
> just make it return true or false and call it stmt_rhs_constant_val_p
> (stmt, val).
> Or even fold it into it's only use,
Sorry about that... I think I will do the latter - insert
get_def_of_stmt_rhs into all_vdef_have_same_lattice_const_value to
> Did you check compile-time and runtime effects of this patch like on
> suppose we can eliminate array zero initialization if there follows
> different initialzation
> with this patch.
I do not have the effect of this patch on SPEC yet, but I certainly
intend to measure it and post the results.
> > :ADDPATCH tree-ssa optimization:
> > Thanks,
> > Revital
> > 2007-03-22 Revital Eres <firstname.lastname@example.org>
> > * tree-ssa-propagate.c
> > New function to get the defining stmt.
> > (get_def_of_stmt_rhs): New helper function
> > which walks on the virtual use-def chain to get the defining
> > stmt.
> > (replace_vuses_in): Call
> > to perform the final replacement and add new parameter which
> > indicates whether store cpp analysis should be extended to
> > analyze memory references based on the virtual use-def chain.
> > (do_store_ccp): New function.
> > (substitute_and_fold): Add new parameter.
> > * tree-ssa-propagate.h
> > Declare.
> > (substitute_and_fold): Change declaration.
> > * tree-vrp.c (vrp_finalize): Call substitute_and_fold with new
> > argument .
> > * tree-ssa-ccp.c (ccp_finalize): Likewise.
> > (visit_assignment): Call
> > while
> > performing the propogation.
> > * tree-ssa-copy.c (fini_copy_prop): Call substitute_and_fold
> > new
> > argument.
> > * testsuite/gcc.dg/store_ccp_test.c: New test.
> > (See attached file: patch_ccp_22_3.txt)(See attached file:
> > store_ccp_test.txt)
More information about the Gcc-patches