Hi, On Fri, Jun 10, 2011 at 04:55:43PM +0200, Jan Hubicka wrote: > Hi,
> this patch updated ipa-cp and ipa-prop for aliases. It is basically > easy - we don't analyze nodes represneting aliases and when > propagating we skip them, like everywhere else. > > There are two problems I noticed. First we should not propagate > through calls that are overwritable. When non-overwritable function > A has overwritable alias B, we should propagate through calls to A, > but not throug calls to B. As discussed on IRC it is probably best > to zap the jump functions in question at IPA stage (because at > analysis stage it is not clear at all if the alias will end up > overwritable with LTO). > OK. Nevertheless, I'd prefer to do this in context of the new IPA-CP. > Similar problem already exists with code in > ipa_compute_jump_functions that looks into a callee that might > change with LTO. I either don't understand or fail to see how this is different from the first problem. We even compute jump functions of indirect edges precisely because we hope they will be changed later on... > Index: ipa-cp.c > =================================================================== > --- ipa-cp.c (revision 174905) > +++ ipa-cp.c (working copy) > @@ -818,7 +828,7 @@ ipcp_iterate_stage (void) > /* Some lattices have changed from IPA_TOP to IPA_BOTTOM. > This change should be propagated. */ > { > - gcc_assert (n_cloning_candidates); > + /*gcc_assert (n_cloning_candidates);*/ > ipcp_propagate_stage (); > } > if (dump_file) I know this assert can be horribly irritating but so far it has been very useful at spotting all kinds of errors at various places. (In fact, you added it :-) But as I want to get the whole IPA-CP replaced, I don't care all that much. Martin