openmp: Add support for non-rectangular loops in taskloop construct
authorJakub Jelinek <jakub@redhat.com>
Thu, 13 Aug 2020 07:06:05 +0000 (09:06 +0200)
committerJakub Jelinek <jakub@redhat.com>
Thu, 13 Aug 2020 07:06:05 +0000 (09:06 +0200)
commit2e47c8c6eac405ceb599bf5e31ac3717c22a008c
tree6b548e09bcebf00f74983be40030d2acc78db3ac
parent7123217afb33d4a2860f552ad778a819cc8dea5e
openmp: Add support for non-rectangular loops in taskloop construct

2020-08-13  Jakub Jelinek  <jakub@redhat.com>

* gimplify.c (gimplify_omp_taskloop_expr): New function.
(gimplify_omp_for): Use it.  For OMP_FOR_NON_RECTANGULAR
loops adjust in outer taskloop the var-outer decls.
* omp-expand.c (expand_omp_taskloop_for_inner): Handle non-rectangular
loops.
(expand_omp_for): Don't reject non-rectangular taskloop.
* omp-general.c (omp_extract_for_data): Don't assert that
non-rectangular loops have static schedule, instead treat loop->m1
or loop->m2 as if loop->n1 or loop->n2 is non-constant.

* testsuite/libgomp.c/loop-22.c (main): Add some further tests.
* testsuite/libgomp.c/loop-23.c (main): Likewise.
* testsuite/libgomp.c/loop-24.c: New test.
gcc/gimplify.c
gcc/omp-expand.c
gcc/omp-general.c
libgomp/testsuite/libgomp.c/loop-22.c
libgomp/testsuite/libgomp.c/loop-23.c
libgomp/testsuite/libgomp.c/loop-24.c [new file with mode: 0644]