]> gcc.gnu.org Git - gcc.git/commit
openacc: Add runtime alias checking for OpenACC kernels
authorAndrew Stubbs <ams@codesourcery.com>
Tue, 16 Nov 2021 15:19:53 +0000 (16:19 +0100)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 21 Jun 2022 13:11:51 +0000 (14:11 +0100)
commita7e863fc4d54fb645fef05f01a024250184964bb
treef5533d225934bb22bc7fbf1498062b4ac5446cc1
parentab53d5a6a27dce2a92f28a62ceb6e184c8356f25
openacc: Add runtime alias checking for OpenACC kernels

This commit adds the code generation for the runtime alias checks for
OpenACC loops that have been analyzed by Graphite.  The runtime alias
check condition gets generated in Graphite. It is evaluated by the
code generated for the IFN_GOACC_LOOP internal function calls.  If
aliasing is detected at runtime, the execution dimensions get adjusted
to execute the affected loops sequentially.

gcc/ChangeLog:

* graphite-isl-ast-to-gimple.cc: Include internal-fn.h.
(graphite_oacc_analyze_scop): Implement runtime alias checks.
* omp-expand.cc (expand_oacc_for): Add an additional "noalias" parameter
to GOACC_LOOP internal calls, and initialise it to integer_one_node.
* omp-offload.cc (oacc_xform_loop): Integrate the runtime alias check
into the GOACC_LOOP expansion.

libgomp/ChangeLog:

* testsuite/libgomp.oacc-c-c++-common/runtime-alias-check-1.c: New test.
* testsuite/libgomp.oacc-c-c++-common/runtime-alias-check-2.c: New test.
gcc/ChangeLog.omp
gcc/graphite-isl-ast-to-gimple.cc
gcc/graphite-scop-detection.cc
gcc/omp-expand.cc
gcc/omp-offload.cc
libgomp/ChangeLog.omp
libgomp/testsuite/libgomp.oacc-c-c++-common/runtime-alias-check-1.c [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-c-c++-common/runtime-alias-check-2.c [new file with mode: 0644]
This page took 0.07337 seconds and 6 git commands to generate.