Commit Graph

2 Commits

Author SHA1 Message Date
Jakub Jelinek 2e47c8c6ea 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.
2020-08-13 09:06:05 +02:00
Jakub Jelinek 9f3abfb84e openmp: Handle even some combined non-rectangular loops
The number of loops computation and logical iteration -> actual iterator values
computations can now be done separately even on composite constructs (though
for triangular loops it would still be more efficient to propagate a few values
through, will handle that incrementally).
simd and taskloop are still unhandled.

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

	* omp-expand.c (expand_omp_for): Don't disallow combined non-rectangular
	loops.

	* testsuite/libgomp.c/loop-22.c: New test.
	* testsuite/libgomp.c/loop-23.c: New test.
2020-08-05 10:45:16 +02:00