On January 24, 2018 6:51:54 PM GMT+01:00, Richard Biener <rguent...@suse.de> wrote: >On January 24, 2018 6:40:25 PM GMT+01:00, Jakub Jelinek ><ja...@redhat.com> wrote: >>On Wed, Jan 24, 2018 at 06:36:02PM +0100, Martin Jambor wrote: >>> > I think there's already a set of attributes that prevent cloning >>and >>> > or are adjusted by the IPA param machinery. The Martins or Honza >>> > should know better. >>> >>> I am not sure I understand the problem but if >>> tree_versionable_function_p returns false, the local.versionable bit >>is >>> not set and no cloning for that function happens. >>> >>> If it is sufficient that IPA-CP and other IPA passes do not change >>the >>> function type in any way (in practice that they don't remove >>> parameters), it is sufficient to clear the >local.can_change_signature >>> cgraph flag in compute_fn_summary() in ipa-fnsummary.c. That is how >>we >>> handle, or rather avoid handling, fnspec attributes. >> >>Well, "omp declare simd" is a part of the ABI just for the original >>exported >>functions, for everything else it is a pure optimization, but I'm not >>sure >>if we want to deoptimize e.g. callers of these functions outside of >>loops >>by disabling the signature changing cloning for those. For calls from >>within OpenMP simd regions or other loops where we try hard to >>vectorize >>them, it might make sense not to change those callers, for callers >from >>other loops, a question. > >Until we can distinguish the cases I think not changing the signature >by default might be a good thing.
Otoh cloning for ipa cp and then inlining is OK. Not sure how the mitigation mechanism works. Richard. >Richard. > >> Jakub