]> git.ipfire.org Git - thirdparty/gcc.git/commit
Enable gimplify GOMP_MAP_STRUCT handling of (COMPONENT_REF (INDIRECT_REF ...)) map...
authorChung-Lin Tang <cltang@codesourcery.com>
Mon, 8 Feb 2021 15:53:55 +0000 (07:53 -0800)
committerChung-Lin Tang <cltang@codesourcery.com>
Mon, 8 Feb 2021 15:53:55 +0000 (07:53 -0800)
commitbf8605f14ec33ea31233a3567f3184fee667b695
tree5e4304e8f703e573722ee4e11613547d935ee6d1
parentc2e4a17adc0989f216c7fc3f93f150c66adba23a
Enable gimplify GOMP_MAP_STRUCT handling of (COMPONENT_REF (INDIRECT_REF ...)) map clauses.

This patch tries to allow map(A->ptr) to be properly handled the same way as
map(B.ptr) expressions. map(struct:*A) clauses are now produced during
gimplify.

This patch, as of time of commit, is only pushed to devel/omp/gcc-10, not yet
submitted as mainline patch to upstream.

2021-02-08  Chung-Lin Tang  <cltang@codesourcery.com>

gcc/ChangeLog:

* gimplify.c ("tree-hash-traits.h"): Add include.
(gimplify_scan_omp_clauses): Change struct_map_to_clause to type
hash_map<tree_operand, tree> *. Adjust struct map handling to handle
cases of *A and A->B expressions.
(gimplify_adjust_omp_clauses): Move GOMP_MAP_STRUCT removal code for
exit data directives code to earlier position.

gcc/testsuite/ChangeLog:

* g++.dg/gomp/target-3.C: Adjust testcase gimple scanning.
* g++.dg/gomp/target-this-2.C: Likewise.
* g++.dg/gomp/target-this-3.C: Likewise.
* g++.dg/gomp/target-this-4.C: Likewise.

libgomp/ChangeLog:

* testsuite/libgomp.c++/target-23.C: New testcase.
gcc/gimplify.c
gcc/testsuite/g++.dg/gomp/target-3.C
gcc/testsuite/g++.dg/gomp/target-this-2.C
gcc/testsuite/g++.dg/gomp/target-this-3.C
gcc/testsuite/g++.dg/gomp/target-this-4.C
libgomp/testsuite/libgomp.c++/target-23.C [new file with mode: 0644]