[PATCH 00/16] OpenMP: lvalues in "map" clauses and struct handling rework

Julian Brown julian@codesourcery.com
Thu Nov 25 14:07:16 GMT 2021


Hi Jakub,

This is a rebased/slightly bug-fixed version of several previously posted
patch series, all in one place for ease of reference.  The series should
be applied on top of Chung-Lin's two patches:

  "Improve OpenMP target support for C++ [PR92120 v5]"
  https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584602.html

  "Remove array section base-pointer mapping semantics, and other front-end
   adjustments (mainline trunk)"
  https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584994.html

And supersedes the following three patch series:

  "Topological sort for OpenMP 5.0 base pointers"
  https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577211.html

  "OpenMP: Deep struct dereferences"
  https://gcc.gnu.org/pipermail/gcc-patches/2021-October/580721.html

  "Parsing of lvalues for "map" clauses for C and C++"
  https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584445.html

Tested with offloading to NVPTX and bootstrapped.  Further commentary
on individual patches.  OK?

Thanks,

Julian

Julian Brown (16):
  Rewrite GOMP_MAP_ATTACH_DETACH mappings unconditionally
  OpenMP/OpenACC: Move array_ref/indirect_ref handling code out of
    extract_base_bit_offset
  OpenACC/OpenMP: Refactor struct lowering in gimplify.c
  OpenACC: Rework indirect struct handling in gimplify.c
  Remove base_ind/base_ref handling from extract_base_bit_offset
  OpenMP 5.0: Clause ordering for OpenMP 5.0 (topological sorting by
    base pointer)
  Remove omp_target_reorder_clauses
  OpenMP/OpenACC: Hoist struct sibling list handling in gimplification
  OpenMP: Allow array ref components for C & C++
  OpenMP: Fix non-zero attach/detach bias for struct dereferences
  OpenMP: Handle reference-typed struct members
  OpenACC: Make deep-copy-arrayofstruct.c a libgomp/runtime test
  Add debug_omp_expr
  OpenMP: Add inspector class to unify mapped address analysis
  OpenMP: lvalue parsing for map clauses (C++)
  OpenMP: lvalue parsing for map clauses (C)

 gcc/c-family/c-common.h                       |   45 +
 gcc/c-family/c-omp.c                          |  210 ++
 gcc/c/c-parser.c                              |  150 +-
 gcc/c/c-tree.h                                |    1 +
 gcc/c/c-typeck.c                              |  250 +-
 gcc/cp/error.c                                |    9 +
 gcc/cp/parser.c                               |  141 +-
 gcc/cp/parser.h                               |    3 +
 gcc/cp/semantics.c                            |  290 +-
 gcc/fortran/trans-openmp.c                    |   20 +-
 gcc/gimplify.c                                | 2458 +++++++++++------
 gcc/omp-low.c                                 |   23 +-
 gcc/testsuite/c-c++-common/gomp/map-1.c       |    3 +-
 gcc/testsuite/c-c++-common/gomp/map-6.c       |    6 +-
 gcc/testsuite/g++.dg/goacc/member-array-acc.C |   13 +
 gcc/testsuite/g++.dg/gomp/ind-base-3.C        |   38 +
 gcc/testsuite/g++.dg/gomp/map-assignment-1.C  |   12 +
 gcc/testsuite/g++.dg/gomp/map-inc-1.C         |   10 +
 gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C  |   19 +
 gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C      |   36 +
 gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C      |   39 +
 .../g++.dg/gomp/map-static-cast-lvalue-1.C    |   17 +
 gcc/testsuite/g++.dg/gomp/map-ternary-1.C     |   20 +
 gcc/testsuite/g++.dg/gomp/member-array-2.C    |   86 +
 gcc/testsuite/g++.dg/gomp/member-array-omp.C  |   13 +
 gcc/testsuite/g++.dg/gomp/pr67522.C           |    2 +-
 gcc/testsuite/g++.dg/gomp/target-3.C          |    4 +-
 gcc/testsuite/g++.dg/gomp/target-lambda-1.C   |    6 +-
 gcc/testsuite/g++.dg/gomp/target-this-2.C     |    2 +-
 gcc/testsuite/g++.dg/gomp/target-this-3.C     |    4 +-
 gcc/testsuite/g++.dg/gomp/target-this-4.C     |    4 +-
 .../g++.dg/gomp/unmappable-component-1.C      |   21 +
 gcc/tree-pretty-print.c                       |   45 +
 gcc/tree-pretty-print.h                       |    1 +
 gcc/tree.def                                  |    3 +
 libgomp/testsuite/libgomp.c++/baseptrs-3.C    |  275 ++
 libgomp/testsuite/libgomp.c++/ind-base-1.C    |  162 ++
 libgomp/testsuite/libgomp.c++/ind-base-2.C    |   49 +
 libgomp/testsuite/libgomp.c++/map-comma-1.C   |   15 +
 .../testsuite/libgomp.c++/map-rvalue-ref-1.C  |   22 +
 .../testsuite/libgomp.c++/member-array-1.C    |   89 +
 libgomp/testsuite/libgomp.c++/struct-ref-1.C  |   97 +
 .../libgomp.c-c++-common/baseptrs-1.c         |   50 +
 .../libgomp.c-c++-common/baseptrs-2.c         |   70 +
 .../libgomp.c-c++-common/ind-base-4.c         |   50 +
 .../libgomp.c-c++-common/unary-ptr-1.c        |   16 +
 .../testsuite/libgomp.oacc-c++/deep-copy-17.C |  101 +
 .../libgomp.oacc-c-c++-common/deep-copy-15.c  |   68 +
 .../libgomp.oacc-c-c++-common/deep-copy-16.c  |  231 ++
 .../deep-copy-arrayofstruct.c                 |    2 +-
 50 files changed, 4114 insertions(+), 1187 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/goacc/member-array-acc.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/ind-base-3.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/map-assignment-1.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/map-inc-1.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/map-static-cast-lvalue-1.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/map-ternary-1.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/member-array-2.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/member-array-omp.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/unmappable-component-1.C
 create mode 100644 libgomp/testsuite/libgomp.c++/baseptrs-3.C
 create mode 100644 libgomp/testsuite/libgomp.c++/ind-base-1.C
 create mode 100644 libgomp/testsuite/libgomp.c++/ind-base-2.C
 create mode 100644 libgomp/testsuite/libgomp.c++/map-comma-1.C
 create mode 100644 libgomp/testsuite/libgomp.c++/map-rvalue-ref-1.C
 create mode 100644 libgomp/testsuite/libgomp.c++/member-array-1.C
 create mode 100644 libgomp/testsuite/libgomp.c++/struct-ref-1.C
 create mode 100644 libgomp/testsuite/libgomp.c-c++-common/baseptrs-1.c
 create mode 100644 libgomp/testsuite/libgomp.c-c++-common/baseptrs-2.c
 create mode 100644 libgomp/testsuite/libgomp.c-c++-common/ind-base-4.c
 create mode 100644 libgomp/testsuite/libgomp.c-c++-common/unary-ptr-1.c
 create mode 100644 libgomp/testsuite/libgomp.oacc-c++/deep-copy-17.C
 create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-15.c
 create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-16.c
 rename {gcc/testsuite/c-c++-common/goacc => libgomp/testsuite/libgomp.oacc-c-c++-common}/deep-copy-arrayofstruct.c (98%)

-- 
2.29.2



More information about the Gcc-patches mailing list