]> git.ipfire.org Git - thirdparty/gcc.git/commit
Annotate inner loops in "acc kernels loop" directives (C/C++).
authorSandra Loosemore <sandra@codesourcery.com>
Thu, 20 Aug 2020 02:18:57 +0000 (19:18 -0700)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 21 Jun 2022 13:11:26 +0000 (14:11 +0100)
commitcdd128b106cd91bf4764e91bdde5b7a8220fd4d0
treeeb84d2fc55fc36ad6f526ef57a2aa1995a4dc68a
parent652fff3f4cb42d95e095991f1f4e173f4347d630
Annotate inner loops in "acc kernels loop" directives (C/C++).

Normally explicit loop directives in a kernels region inhibit
automatic annotation of other loops in the same nest, on the theory
that users have indicated they want manual control over that section
of code.  However there seems to be an expectation in user code that
the combined "kernels loop" directive should still allow annotation of
inner loops.  This patch implements this behavior for C and C++.

2020-08-19  Sandra Loosemore  <sandra@codesourcery.com>

gcc/c-family/
* c-omp.cc (annotate_loops_in_kernels_regions): Process inner
loops in combined "acc kernels loop" directives.

gcc/testsuite/
* c-c++-common/goacc/kernels-loop-annotation-18.c: New.
* c-c++-common/goacc/kernels-loop-annotation-19.c: New.
* c-c++-common/goacc/combined-directives.c: Adjust expected
patterns.
gcc/c-family/ChangeLog.omp
gcc/c-family/c-omp.cc
gcc/testsuite/ChangeLog.omp
gcc/testsuite/c-c++-common/goacc/combined-directives.c
gcc/testsuite/c-c++-common/goacc/kernels-loop-annotation-18.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/goacc/kernels-loop-annotation-19.c [new file with mode: 0644]