]> git.ipfire.org Git - thirdparty/gcc.git/commit
omp-builtins.def (BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START, [...]): New builtins.
authorJakub Jelinek <jakub@redhat.com>
Thu, 25 Oct 2018 18:36:36 +0000 (20:36 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 25 Oct 2018 18:36:36 +0000 (20:36 +0200)
commite48294bd978b736073551535dcd8435c42e928af
treebf914ac940d5564771c2509c9a2ed301b375d5e0
parent8901731dae26e370fc64d8a8418c6b2b08526724
omp-builtins.def (BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START, [...]): New builtins.

* omp-builtins.def (BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME): New builtins.
* omp-expand.c (expand_parallel_call, expand_omp_for): Emit
the GOMP_*nonmonotonic_runtime* or GOMP_*maybe_nonmonotonic_runtime*
builtins instead of GOMP_*runtime* if there is nonmonotonic modifier
or if there is no modifier and no ordered clause.
gcc/c/
* c-typeck.c (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
with static, runtime or auto schedule kinds.
gcc/cp/
* semantics.c (finish_omp_clauses): Don't diagnose nonmonotonic clause
with static, runtime or auto schedule kinds.
gcc/testsuite/
* g++.dg/gomp/for-6.C: Change expected library call.
* gcc.dg/gomp/for-6.c: Likewise.
* gcc.dg/gomp/combined-1.c: Moved to ...
* c-c++-common/gomp/combined-1.c: ... here.  Adjust expected library
call.
* c-c++-common/gomp/combined-2.c: New test.
* c-c++-common/gomp/combined-3.c: New test.
* c-c++-common/gomp/for-6.c: New test.
* c-c++-common/gomp/for-7.c: New test.
* c-c++-common/gomp/schedule-modifiers-1.c (bar): Don't expect
diagnostics for nonmonotonic modifier with static, runtime or auto
schedule kinds.
libgomp/
* omp.h.in (enum omp_sched_t): Add omp_sched_monotonic.
* libgomp_g.h (GOMP_loop_nonmonotonic_runtime_start,
GOMP_loop_maybe_nonmonotonic_runtime_start,
GOMP_loop_nonmonotonic_runtime_next,
GOMP_loop_maybe_nonmonotonic_runtime_next,
GOMP_parallel_loop_nonmonotonic_runtime,
GOMP_parallel_loop_maybe_nonmonotonic_runtime,
GOMP_loop_ull_nonmonotonic_runtime_start,
GOMP_loop_ull_maybe_nonmonotonic_runtime_start,
GOMP_loop_ull_nonmonotonic_runtime_next,
GOMP_loop_ull_maybe_nonmonotonic_runtime_next): New prototypes.
* libgomp.h (enum gomp_schedule_type): Add GFS_MONOTONIC.
* libgomp.map (GOMP_5.0): Export
GOMP_loop_maybe_nonmonotonic_runtime_next,
GOMP_loop_maybe_nonmonotonic_runtime_start,
GOMP_loop_nonmonotonic_runtime_next,
GOMP_loop_nonmonotonic_runtime_start,
GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
GOMP_loop_ull_maybe_nonmonotonic_runtime_start,
GOMP_loop_ull_nonmonotonic_runtime_next,
GOMP_loop_ull_nonmonotonic_runtime_start,
GOMP_parallel_loop_maybe_nonmonotonic_runtime,
GOMP_parallel_loop_nonmonotonic_runtime.
* env.c (parse_schedule): Parse monotonic and nonmonotonic modifiers
in OMP_SCHEDULE variable.  Set GFS_MONOTONIC for monotonic schedules.
(handle_omp_display_env): Display monotonic/nonmonotonic schedule
modifiers.  Display (non-default) chunk sizes.
* fortran.c (omp_get_schedule_, omp_get_schedule_8_): Mask off
GFS_MONOTONIC bit.
* icv.c (omp_set_schedule): Mask off omp_sched_monotonic bit in switch.
* loop.c (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
GOMP_loop_doacross_runtime_start, GOMP_parallel_loop_runtime_start):
Mask off GFS_MONOTONIC bit.
(GOMP_loop_maybe_nonmonotonic_runtime_next,
GOMP_loop_maybe_nonmonotonic_runtime_start,
GOMP_loop_nonmonotonic_runtime_next,
GOMP_loop_nonmonotonic_runtime_start,
GOMP_parallel_loop_maybe_nonmonotonic_runtime,
GOMP_parallel_loop_nonmonotonic_runtime): New aliases or wrapper
functions.
* loop_ull.c (GOMP_loop_ull_runtime_start,
GOMP_loop_ull_ordered_runtime_start,
GOMP_loop_ull_doacross_runtime_start): Mask off GFS_MONOTONIC bit.
(GOMP_loop_ull_maybe_nonmonotonic_runtime_next,
GOMP_loop_ull_maybe_nonmonotonic_runtime_start,
GOMP_loop_ull_nonmonotonic_runtime_next,
GOMP_loop_ull_nonmonotonic_runtime_start): Likewise.

From-SVN: r265502
26 files changed:
gcc/ChangeLog.gomp
gcc/c/ChangeLog.gomp
gcc/c/c-typeck.c
gcc/cp/ChangeLog.gomp
gcc/cp/semantics.c
gcc/omp-builtins.def
gcc/omp-expand.c
gcc/testsuite/ChangeLog.gomp
gcc/testsuite/c-c++-common/gomp/combined-1.c [moved from gcc/testsuite/gcc.dg/gomp/combined-1.c with 77% similarity]
gcc/testsuite/c-c++-common/gomp/combined-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/combined-3.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/for-6.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/for-7.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/schedule-modifiers-1.c
gcc/testsuite/g++.dg/gomp/for-6.C
gcc/testsuite/gcc.dg/gomp/for-6.c
libgomp/ChangeLog.gomp
libgomp/env.c
libgomp/fortran.c
libgomp/icv.c
libgomp/libgomp.h
libgomp/libgomp.map
libgomp/libgomp_g.h
libgomp/loop.c
libgomp/loop_ull.c
libgomp/omp.h.in