From: Jakub Jelinek <jakub@redhat.com>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org, asolokha@gmx.com,
Julian Brown <julian@codesourcery.com>
Subject: Re: OpenACC 'kernels' decomposition: Mark variables used in synthesized data clauses as addressable [PR100280]
Date: Wed, 2 Mar 2022 14:30:40 +0100 [thread overview]
Message-ID: <Yh9xgIfXUJx1vsIL@tucnak> (raw)
In-Reply-To: <87zgm9mxib.fsf@euler.schwinge.homeip.net>
On Tue, Mar 01, 2022 at 05:46:20PM +0100, Thomas Schwinge wrote:
> OK to proceed in this way?
With a suitable ChangeLog entry and one nit fixed yes.
> --- gcc/omp-low.cc
> +++ gcc/omp-low.cc
> @@ -188,7 +188,7 @@ struct omp_context
> static splay_tree all_contexts;
> static int taskreg_nesting_level;
> static int target_nesting_level;
> -static bitmap task_shared_vars;
> +static bitmap make_addressable_vars;
> static bitmap global_nonaddressable_vars;
> static vec<omp_context *> taskreg_contexts;
> static vec<gomp_task *> task_cpyfns;
> @@ -572,9 +572,9 @@ use_pointer_for_field (tree decl, omp_context *shared_ctx)
> /* Taking address of OUTER in lower_send_shared_vars
> might need regimplification of everything that uses the
> variable. */
> - if (!task_shared_vars)
> - task_shared_vars = BITMAP_ALLOC (NULL);
> - bitmap_set_bit (task_shared_vars, DECL_UID (outer));
> + if (!make_addressable_vars)
> + make_addressable_vars = BITMAP_ALLOC (NULL);
> + bitmap_set_bit (make_addressable_vars, DECL_UID (outer));
Has the MUA replaced tabs with spaces?
> --- gcc/omp-oacc-kernels-decompose.cc
> +++ gcc/omp-oacc-kernels-decompose.cc
> @@ -845,7 +845,11 @@ maybe_build_inner_data_region (location_t loc, gimple *body,
> prev_mapped_var = v;
>
> /* See <https://gcc.gnu.org/PR100280>. */
> - TREE_ADDRESSABLE (v) = 1;
> + if (!TREE_ADDRESSABLE (v))
> + {
> + /* Request that OMP lowering make 'v' addressable. */
> + OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE (new_clause) = 1;
> + }
That is a single statement body, so shouldn't have {}s around it.
Jakub
next prev parent reply other threads:[~2022-03-02 13:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190508145157.08beb4df@squid.athome>
2022-01-13 9:54 ` Thomas Schwinge
2022-03-01 16:46 ` Thomas Schwinge
2022-03-02 13:30 ` Jakub Jelinek [this message]
2022-03-04 13:34 ` Add 'c-c++-common/goacc/kernels-decompose-pr104132-1.c' [PR104132] Thomas Schwinge
2022-03-04 13:34 ` Add 'c-c++-common/goacc/kernels-decompose-pr104133-1.c' [PR104133] Thomas Schwinge
2022-03-04 13:46 ` OMP lowering: Regimplify 'OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE' DECLs [PR100280, PR104132, PR104133] Thomas Schwinge
2022-03-04 14:57 ` Test 'libgomp.oacc-*/kernels-private-vars-*' with '--param=openacc-kernels=decompose' [PR104784] Thomas Schwinge
2022-03-04 19:52 ` Thomas Schwinge
2022-03-04 13:37 ` Add diagnostic: "note: OpenACC 'kernels' decomposition: variable '[...]' declared in block made addressable" [PR100280] Thomas Schwinge
2022-03-04 13:41 ` OpenACC 'kernels' decomposition: Move 'TREE_ADDRESSABLE' setting into OMP lowering [PR100280] Thomas Schwinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yh9xgIfXUJx1vsIL@tucnak \
--to=jakub@redhat.com \
--cc=asolokha@gmx.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=julian@codesourcery.com \
--cc=thomas@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).