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.