On 06/17/2014 10:00 PM, Jeff Law wrote: > On 06/13/14 04:26, mliska wrote: >> Hi, >> this small patch prepares remaining needed infrastructure for the new pass. >> >> Changelog: >> >> 2014-06-13 Martin Liska >> Honza Hubicka >> >> * ipa-utils.h (polymorphic_type_binfo_p): Function marked external >> instead of static. >> * ipa-devirt.c (polymorphic_type_binfo_p): Likewise. >> * ipa-prop.h (count_formal_params): Likewise. >> * ipa-prop.c (count_formal_params): Likewise. >> * ipa-utils.c (ipa_merge_profiles): Be more tolerant if we merge >> profiles for semantically equivalent functions. >> * passes.c (do_per_function): If we load body of a function during WPA, >> this condition should behave same. >> * varpool.c (ctor_for_folding): More tolerant assert for variable >> aliases created during WPA. > Presumably we don't have any useful way to merge the cases where we have provides for SRC & DST in ipa_merge_profiles or even to guess which is more useful when presented with both? Does it make sense to log this into a debugging file when we drop one? Hello, this merge function was written by Honza, what do you think Honza about this note? > I think this patch is fine. If adding logging makes sense, then feel free to do so and consider that trivial change pre-approved. I made a small change to this patch, where I moved 'gsi_next_nonvirtual_phi' from the pass to gimple-iterator.h. Ready for trunk with this change? Thanks, Martin gcc/ChangeLog 2014-06-30 Martin Liska Honza Hubicka * gimple-iterator.h (gsi_next_nonvirtual_phi): New function. * ipa-utils.h (polymorphic_type_binfo_p): Function marked external instead of static. * ipa-devirt.c (polymorphic_type_binfo_p): Likewise. * ipa-prop.h (count_formal_params): Likewise. * ipa-prop.c (count_formal_params): Likewise. * ipa-utils.c (ipa_merge_profiles): Be more tolerant if we merge profiles for semantically equivalent functions. * passes.c (do_per_function): If we load body of a function during WPA, this condition should behave same. * varpool.c (ctor_for_folding): More tolerant assert for variable aliases created during WPA. > > Jeff >