]> git.ipfire.org Git - thirdparty/gcc.git/commit
[og11] OpenMP/OpenACC: Move array_ref/indirect_ref handling code out of extract_base_...
authorJulian Brown <julian@codesourcery.com>
Thu, 3 Jun 2021 13:47:00 +0000 (06:47 -0700)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 21 Jun 2022 13:11:39 +0000 (14:11 +0100)
commit35b976d48e91a2422c7163c391d57e35daa40e5f
treeea5967366626aee0e2402740187528214b7eebca
parent404817a47635a088c7002e33dd85c219703447a9
[og11] OpenMP/OpenACC: Move array_ref/indirect_ref handling code out of extract_base_bit_offset

At Richard Biener's suggestion, this patch undoes the following patch:

  https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571712.html

and moves the stripping of ARRAY_REFS/INDIRECT_REFS out of
extract_base_bit_offset and back into the (two) call sites of the
function. The difference between the two ways of looking through these
nodes comes down to (I think) what processing has been done on the
clause in question already: in the case where BASE_REF is non-NULL,
we are processing an OMP_CLAUSE_DECL for the first time. Conversely,
when BASE_REF is NULL, we are processing a node from the sorted list
that is being constructed after a GOMP_MAP_STRUCT node.

2021-06-07  Julian Brown  <julian@codesourcery.com>

gcc/
* gimplify.cc (extract_base_bit_offset): Don't look through ARRAY_REFs or
INDIRECT_REFs here.
(build_struct_group): Reinstate previous behaviour for handling
ARRAY_REFs/INDIRECT_REFs.
gcc/ChangeLog.omp
gcc/gimplify.cc