From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id DC06F384783B; Fri, 21 May 2021 18:54:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC06F384783B MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-984] [OpenACC privatization] Explain two different configurations [PR90115] X-Act-Checkin: gcc X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/master X-Git-Oldrev: ff451ea723deb3fe8471eb96ac9381c063ec6533 X-Git-Newrev: 21803fcaebeab36de0d7b6b8cf6abb9389f5e51f Message-Id: <20210521185444.DC06F384783B@sourceware.org> Date: Fri, 21 May 2021 18:54:44 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2021 18:54:45 -0000 https://gcc.gnu.org/g:21803fcaebeab36de0d7b6b8cf6abb9389f5e51f commit r12-984-g21803fcaebeab36de0d7b6b8cf6abb9389f5e51f Author: Thomas Schwinge Date: Thu May 20 15:44:09 2021 +0200 [OpenACC privatization] Explain two different configurations [PR90115] gcc/ PR middle-end/90115 * omp-offload.c (execute_oacc_device_lower): Explain. Diff: --- gcc/omp-offload.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c index 36bd2e44d81..336b48d5a3b 100644 --- a/gcc/omp-offload.c +++ b/gcc/omp-offload.c @@ -2206,6 +2206,26 @@ execute_oacc_device_lower () gsi_next (&gsi); } + /* Regarding the OpenACC privatization level, we're currently only looking at + making the gang-private level work. Regarding that, we have the following + configurations: + + - GCN offloading: 'targetm.goacc.adjust_private_decl' does the work (in + particular, change 'TREE_TYPE', etc.) and there is no + 'targetm.goacc.expand_var_decl'. + + - nvptx offloading: 'targetm.goacc.adjust_private_decl' only sets a + marker and then 'targetm.goacc.expand_var_decl' does the work. + + Eventually (in particular, for worker-private level?), both + 'targetm.goacc.adjust_private_decl' and 'targetm.goacc.expand_var_decl' + may need to do things, but that's currently not meant to be addressed, and + thus not fully worked out and implemented, and thus untested. Hence, + 'assert' what currently is implemented/tested, only. */ + + if (targetm.goacc.expand_var_decl) + gcc_assert (adjusted_vars.is_empty ()); + /* Make adjustments to gang-private local variables if required by the target, e.g. forcing them into a particular address space. Afterwards, ADDR_EXPR nodes which have adjusted variables as their argument need to