This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ICEs with "omp declare simd" attribute on versioned fns or omp_fn* (PR middle-end/83977)


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.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]