> By the way, in the future we may want ipa-cp to merge clones that are > equivalent (let's say one of the predicate says that a parameter is > greater than 10 and we have a bunch of callers supplying values 1, 2 > and 8, we will want to create just one clone for all three values > because the effect is the same). This means that eventually ipa-cp > will be interested in the clause_t for various values, merge > opportunities which have the same one, create a single clone for them > and somehow have the materialization modify the function body > accordingly. The infrastructure required is not trivial but it is > probably something to think about.
Yep, I also wondered about this. It will however need some way to promote down the set of known truths to local optimizers... > 2011-05-10 Martin Jambor <mjam...@suse.cz> > > * ipa-prop.c (ipa_cst_from_jfunc): New function. > * ipa-prop.h (ipa_cst_from_jfunc): Declare. > * ipa-inline-analysis.c (evaluate_conditions_for_edge): Use it. > (evaluate_conditions_for_ipcp_clone): Removed. > (estimate_ipcp_clone_size_and_time): Accept vector of known constants. > * ipa-cp.c (ipcp_estimate_growth): Build vector of known constants. > * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update. OK Honza