This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR68640] Clear restrict in install_var_field
- From: Richard Biener <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Tom de Vries <Tom_deVries at mentor dot com>, "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Date: Tue, 8 Dec 2015 10:22:32 +0100 (CET)
- Subject: Re: [PATCH, PR68640] Clear restrict in install_var_field
- Authentication-results: sourceware.org; auth=none
- References: <566699AD dot 9040809 at mentor dot com> <20151208091829 dot GJ5675 at tucnak dot redhat dot com>
On Tue, 8 Dec 2015, Jakub Jelinek wrote:
> On Tue, Dec 08, 2015 at 09:49:49AM +0100, Tom de Vries wrote:
> > diff --git a/gcc/omp-low.c b/gcc/omp-low.c
> > index d1d1e3c..ac4a94d 100644
> > --- a/gcc/omp-low.c
> > +++ b/gcc/omp-low.c
> > @@ -1389,6 +1389,12 @@ install_var_field (tree var, bool by_ref, int mask, omp_context *ctx,
> > || !is_gimple_omp_oacc (ctx->stmt));
> >
> > type = TREE_TYPE (var);
> > + /* Prevent redeclaring the var in the split-off function with a restrict
> > + pointer type. Note that we only clear type itself, restrict qualifiers in
> > + the pointed-to type will be ignored by points-to analysis. */
> > + if (POINTER_TYPE_P (type))
> > + type = build_qualified_type (type, TYPE_QUALS (type) & ~TYPE_QUAL_RESTRICT);
>
> Is it necessary to call build_qualified_type in the common case (when it is
> not restrict)? I'd think if (POINTER_TYPE_P (type) && TYPE_RESTRICT (type))
> might be better.
> That said, I forgot when exactly are the cliques computed, it would be nice
> if then computing those and seeing a
> GOMP_parallel/GOACC_parallel_keyed/GOMP_target_ext/GOMP_task/GOMP_taskloop*
> builtins we would just continue walking the outlined functions they refer to
> as if it was a part of the current function for the purpose of the restrict
> computation.
Cliques are not computed in IPA PTA and the above would require IPA.
Richard.