The annotator that detects loops in kernels regions and adds "auto" attributes to them presently ignores loops nested in an explicitly-annotated loop, on the theory that the user likely marked up only some of the loops in the nest as a means of deliberately controlling the parallelism.
Inspection of actual user code, though, indicates that this isn't really the correct expected behavior for combined "acc kernels loop" directives. Here the expectation seems to be that the entire loop nest should be considered for annotation. This series of patches implements this tweak to the annotation logic in the C, C++, and Fortran front ends. We've had some internal discussion to confirm that this is a reasonable change in behavior, but nobody is available to review these patches in a timely manner, so I have gone ahead and committed them to the OG10 branch. In due course they will be combined with the original annotation patches (which haven't been reviewed properly yet either) and any other bug fixes or tweaks to the behavior, and resubmitted for mainline. -Sandra Sandra Loosemore (3): Add a "combined" flag for "acc kernels loop" etc directives. Annotate inner loops in "acc kernels loop" directives (C/C++). Annotate inner loops in "acc kernels loop" directives (Fortran). gcc/ChangeLog.omp | 6 +++ gcc/c-family/ChangeLog.omp | 7 +++ gcc/c-family/c-omp.c | 36 ++++++++++------ gcc/c/ChangeLog.omp | 6 +++ gcc/c/c-parser.c | 3 ++ gcc/cp/ChangeLog.omp | 6 +++ gcc/cp/parser.c | 3 ++ gcc/fortran/ChangeLog.omp | 15 +++++++ gcc/fortran/openmp.c | 50 +++++++++++++++++++++- gcc/fortran/trans-openmp.c | 30 ++++++++----- gcc/testsuite/ChangeLog.omp | 21 +++++++++ .../c-c++-common/goacc/combined-directives.c | 2 +- .../goacc/kernels-loop-annotation-18.c | 18 ++++++++ .../goacc/kernels-loop-annotation-19.c | 19 ++++++++ .../gfortran.dg/goacc/combined-directives.f90 | 19 ++++++-- .../goacc/kernels-loop-annotation-18.f95 | 28 ++++++++++++ .../goacc/kernels-loop-annotation-19.f95 | 29 +++++++++++++ .../goacc/private-explicit-kernels-1.f95 | 7 ++- .../goacc/private-predetermined-kernels-1.f95 | 7 ++- gcc/tree.h | 5 +++ 20 files changed, 284 insertions(+), 33 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/goacc/kernels-loop-annotation-18.c create mode 100644 gcc/testsuite/c-c++-common/goacc/kernels-loop-annotation-19.c create mode 100644 gcc/testsuite/gfortran.dg/goacc/kernels-loop-annotation-18.f95 create mode 100644 gcc/testsuite/gfortran.dg/goacc/kernels-loop-annotation-19.f95 -- 2.8.1