[0/2] Use Graphite for OpenACC "kernels" regions

Message ID xu8f4kluj38s.fsf@harwath.name
Headers show
Series
  • Use Graphite for OpenACC "kernels" regions
Related show

Message

Frederik Harwath Nov. 12, 2020, 10:09 a.m.
Hi,
the two following patches implement a new handling of the loops in
OpenACC "kernels" regions which is based on Graphite and which is meant
to replace the current handling based on the "parloops" pass.  This
extends the class of OpenACC codes using "kernels" regions that can be
analysed by GCC's OpenACC implementation considerably.

We would like to incorporate this work into master soon, but further
work will be necessary in the next weeks to resolve some open questions,
clean up the code etc. In particular, the patches cannot be applied on
master currently because they rely on other patches which have not been
committed to master yet, e.g. the re-ordering of the OpenACC passes to
run device lowering after Graphite which has recently been submitted
(subject "Move pass_oacc_device_lower after pass_graphite"), the
transformation pass which converts OpenACC kernels regions to parallel
regions from OG10 (commit 809ea59722263eb6c2d48402e1eed80727134038).

Best regards,
Frederik


Frederik Harwath (2):
  [WIP] OpenACC: Add Graphite-based handling of "auto" loops
  OpenACC: Add Graphite-based "kernels" handling to pass_convert_oacc_kernels

 gcc/c-family/c.opt                            |   5 +-
 gcc/common.opt                                |   8 +
 gcc/doc/invoke.texi                           |  10 +-
 gcc/doc/passes.texi                           |   6 +-
 gcc/flag-types.h                              |   1 +
 gcc/gimple-pretty-print.c                     |   3 +
 gcc/gimple.h                                  |   9 +-
 gcc/gimplify.c                                |   1 +
 gcc/graphite-dependences.c                    |  12 +-
 gcc/graphite-isl-ast-to-gimple.c              |  77 +-
 gcc/graphite-oacc.h                           |  90 ++
 gcc/graphite-scop-detection.c                 | 828 ++++++++++++++----
 gcc/graphite-sese-to-poly.c                   |  26 +-
 gcc/graphite.c                                | 403 ++++++++-
 gcc/graphite.h                                |  11 +-
 gcc/internal-fn.h                             |   7 +-
 gcc/omp-expand.c                              |  89 +-
 gcc/omp-general.c                             |  19 +-
 gcc/omp-general.h                             |   1 +
 gcc/omp-low.c                                 |  76 +-
 gcc/omp-oacc-kernels.c                        |  59 +-
 gcc/omp-offload.c                             | 223 ++++-
 gcc/predict.c                                 |   2 +-
 .../goacc/kernels-conversion-parloops.c       |  61 ++
 .../c-c++-common/goacc/kernels-conversion.c   |  12 +-
 .../graphite/alias-0-no-runtime-check.c       |  20 +
 .../gcc.dg/graphite/alias-0-runtime-check.c   |  21 +
 gcc/testsuite/gcc.dg/graphite/alias-1.c       |  22 +
 .../gfortran.dg/goacc/kernels-reductions.f90  |  37 +
 gcc/tree-chrec-oacc.h                         |  45 +
 gcc/tree-chrec.c                              |  16 +-
 gcc/tree-data-ref.c                           | 112 ++-
 gcc/tree-data-ref.h                           |   8 +-
 gcc/tree-loop-distribution.c                  |  17 +-
 gcc/tree-parloops.c                           |  16 +-
 gcc/tree-scalar-evolution.c                   | 257 +++++-
 gcc/tree-ssa-loop-ivcanon.c                   |   9 +-
 gcc/tree-ssa-loop-niter.c                     |  13 +
 gcc/tree-ssa-loop.c                           |  10 +
 39 files changed, 2265 insertions(+), 377 deletions(-)
 create mode 100644 gcc/graphite-oacc.h
 create mode 100644 gcc/testsuite/c-c++-common/goacc/kernels-conversion-parloops.c
 create mode 100644 gcc/testsuite/gcc.dg/graphite/alias-0-no-runtime-check.c
 create mode 100644 gcc/testsuite/gcc.dg/graphite/alias-0-runtime-check.c
 create mode 100644 gcc/testsuite/gcc.dg/graphite/alias-1.c
 create mode 100644 gcc/testsuite/gfortran.dg/goacc/kernels-reductions.f90
 create mode 100644 gcc/tree-chrec-oacc.h

--
2.17.1
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter