On Thu, Sep 20, 2018 at 11:57:50AM -0700, Cesar Philippidis wrote:
> 2018-XX-YY Cesar Philippidis <[email protected]>
>
> * omp-low.c (install_var_field): New base_pointer_restrict
> argument.
> (scan_sharing_clauses): Update call to install_var_field.
> (omp_target_base_pointers_restrict_p): New function.
> (scan_omp_target): Update call to install_var_field.
> ---
> gcc/omp-low.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 83 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/omp-low.c b/gcc/omp-low.c
> index 24685fd012c..a59c15ae5fd 100644
> --- a/gcc/omp-low.c
> +++ b/gcc/omp-low.c
> @@ -642,7 +642,8 @@ build_sender_ref (tree var, omp_context *ctx)
> BASE_POINTERS_RESTRICT, declare the field with restrict. */
>
> static void
> -install_var_field (tree var, bool by_ref, int mask, omp_context *ctx)
> +install_var_field (tree var, bool by_ref, int mask, omp_context *ctx,
> + bool base_pointers_restrict = false)
Can this be a bool in omp_context that you just initialize early, so that it
isn't passed all around?
> @@ -987,10 +992,12 @@ fixup_child_record_type (omp_context *ctx)
> }
>
> /* Instantiate decls as necessary in CTX to satisfy the data sharing
> - specified by CLAUSES. */
> + specified by CLAUSES. If BASE_POINTERS_RESTRICT, install var field with
> + restrict. */
>
> static void
> -scan_sharing_clauses (tree clauses, omp_context *ctx)
> +scan_sharing_clauses (tree clauses, omp_context *ctx,
> + bool base_pointers_restrict = false)
And here etc.
Jakub