diff options
author | Julian Brown <julian@codesourcery.com> | 2022-10-14 11:06:07 +0000 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2022-10-20 11:58:40 +0200 |
commit | 7c55755d4c760de326809636531478fd7419e1e5 (patch) | |
tree | 58a242754d1c1a62568b2e5fafe2b7fbc5c5f935 /gcc/value-range.cc | |
parent | 25861cf3a88a07c8dca3fb32d098c0ad756bbe38 (diff) | |
download | gcc-7c55755d4c760de326809636531478fd7419e1e5.zip gcc-7c55755d4c760de326809636531478fd7419e1e5.tar.gz gcc-7c55755d4c760de326809636531478fd7419e1e5.tar.bz2 |
amdgcn: Use FLAT addressing for all functions with pointer arguments [PR105421]
The GCN backend uses a heuristic to determine whether to use FLAT or
GLOBAL addressing in a particular (offload) function: namely, if a
function takes a pointer-to-scalar parameter, it is assumed that the
pointer may refer to "flat scratch" space, and thus FLAT addressing must
be used instead of GLOBAL.
I came up with this heuristic initially whilst working on support for
moving OpenACC gang-private variables into local-data share (scratch)
memory. The assumption that only scalar variables would be transformed in
that way turned out to be wrong. For example, prior to the next patch in
the series, Fortran compiler-generated temporary structures were treated
as gang private and moved to LDS space, typically overflowing the region
allocated for such variables. That will no longer happen after that
patch is applied, but there may be other cases of structs moving to LDS
space now or in the future that this patch may be needed for.
2022-10-14 Julian Brown <julian@codesourcery.com>
PR target/105421
gcc/
* config/gcn/gcn.cc (gcn_detect_incoming_pointer_arg): Any pointer
argument forces FLAT addressing mode, not just
pointer-to-non-aggregate.
Diffstat (limited to 'gcc/value-range.cc')
0 files changed, 0 insertions, 0 deletions