gnu/gcc/1da280a13bd0fed8801e4bdc95dcd0e780378df7 openmp: Turn -fopenmp-ompt{,-detailed} into a single option with argument
Replace the pair of boolean options -fopenmp-ompt and -fopenmp-ompt-detailed
with a single -fopenmp-ompt[=level] option, where level is one of minimal
(the previous default, i.e. neither option given), basic (the previous
-fopenmp-ompt), or extended (the previous -fopenmp-ompt-detailed). Plain
-fopenmp-ompt is an alias for -fopenmp-ompt=basic.
This avoids the previous scheme in which -fopenmp-ompt-detailed silently
implied -fopenmp-ompt, and makes it clearer that the levels are on an
ordered scale rather than independent toggles. There is no
-fno-openmp-ompt, since minimal detail is always available once -fopenmp
is in effect.
Also improve the documentation wording to emphasise the observable effect to
the user rather than implementation details.
gcc/ChangeLog:
* common.opt (fopenmp-ompt): Turn into an alias for
-fopenmp-ompt=basic.
(fopenmp-ompt=): New option, replacing fopenmp-ompt{,-detailed}.
* common.opt.urls: Regenerate.
* doc/invoke.texi (-fopenmp-ompt): Document the new levels and
drop -fopenmp-ompt-detailed.
* flag-types.h (enum omp_ompt_level): New.
* omp-expand.cc (expand_omp_for_static_nochunk,
expand_omp_for_static_chunk): Check flag_openmp_ompt against
OMP_OMPT_LEVEL_EXTENDED instead of flag_openmp_ompt_detailed.
* opts.cc (finish_options): Adjust diagnostic for the removal of
-fopenmp-ompt-detailed.
libgomp/ChangeLog:
* config/gcn/teams.c (GOMP_distribute_static_worksharing_start):
Update comment.
* config/nvptx/teams.c (GOMP_distribute_static_worksharing_start):
Likewise.
* loop.c (GOMP_loop_static_worksharing_start): Likewise.
* teams.c (GOMP_distribute_static_worksharing_start): Likewise.
* testsuite/libgomp.c-c++-common/for-static-3.c: Use
-fopenmp-ompt=extended instead of -fopenmp-ompt-detailed.
gcc/testsuite/ChangeLog:
* c-c++-common/gomp/for-static-3.c: Use -fopenmp-ompt=extended
instead of -fopenmp-ompt-detailed.
* c-c++-common/gomp/openmp-ompt-1.c: Adjust expected diagnostic.
* c-c++-common/gomp/openmp-ompt-2.c: Use -fopenmp-ompt=extended
and adjust expected diagnostic.
* c-c++-common/gomp/scan-8.c: Use -fopenmp-ompt=basic instead of
-fopenmp-ompt.
* c-c++-common/gomp/scope-7.c: Likewise.
* c-c++-common/gomp/single2.c: Likewise.
* c-c++-common/gomp/for-static-4.c: New test.
* c-c++-common/gomp/openmp-ompt-3.c: New test.
* c-c++-common/gomp/openmp-ompt-4.c: New test.
20 files changed