]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
OpenMP: docs - improve -fopenmp-ompt(-detailed) description + update impl. status
authorTobias Burnus <tburnus@baylibre.com>
Fri, 17 Jul 2026 15:19:46 +0000 (17:19 +0200)
committerTobias Burnus <tburnus@baylibre.com>
Fri, 17 Jul 2026 15:19:46 +0000 (17:19 +0200)
invoke.texi: Improve the wording for -fopenmp-ompt(-detailed) that was
added in r17-2288-gab0dd7d5e16fcd.

libgomp.texi: Mark OpenMP 5.1's 'device_type(...)' for variables on
'declare target' as partially implemented as parsing support was added for
C/C++ in r10-2342-g77eb117f588686 and for Fortran in r11-2858-gd58e7173ef964d.

(device_type: It actually seems to work fine, even though there is almost no
code to handle 'host' differently; still host/nohost handling should be
improved for vars and funcs; hence, marked as only partial not as fully
supported.)

gcc/ChangeLog:

* doc/invoke.texi (-fopenmp-ompt, -fopenmp-ompt-detailed): Improve
wording.

libgomp/ChangeLog:

* libgomp.texi (OpenMP 5.1 Impl Status): Mark device_type on vars
in declare target as 'P'.

gcc/doc/invoke.texi
libgomp/libgomp.texi

index 739fc77c282b550f630dcfc33533096107f3a47b..2c2ed1a003fe0fac2aa8a3ac914d5b6615d88c50 100644 (file)
@@ -5623,19 +5623,25 @@ to the current task region, independent of the specified @code{bind} clause.
 @opindex fno-openmp-ompt
 @cindex OpenMP OMPT
 @item -fopenmp-ompt
-Emit additional calls into libgomp, enabling OMPT callbacks around some OpenMP
-worksharing constructs (namely statically scheduled @code{for} and
-@code{distribute}, @code{single}, @code{masked} and @code{master}), so that an
-OMPT tool can observe their start and end.  Requires @option{-fopenmp}.
+For some OpenMP constructs, generate calls into the OpenMP runtime before and
+after the region instead of only on region entry.  For those constructs, the
+additional calls are only needed to provide better tracing results in tools
+using the OMPT interface and have a small overhead.  The extra calls are
+generated for the @code{single}, @code{masked}, and @code{master} constructs
+and with static scheduling for the @code{distribute} and worksharing loop
+constructs.  Requires @option{-fopenmp}.
 
 @opindex fopenmp-ompt-detailed
 @opindex fno-openmp-ompt-detailed
 @cindex OpenMP OMPT
 @item -fopenmp-ompt-detailed
-Like @option{-fopenmp-ompt}, and additionally emit calls into libgomp, enabling
-OMPT dispatch callbacks that get called at the beginning of each workshare chunk
-for statically scheduled @code{for} and @code{distribute}.  Requires
-@option{-fopenmp}.
+Add additional calls into the OpenMP runtime for more detailed tracing via OMPT,
+which might have a measurable effect on the performance.  The option enables
+additional constructs to issue events for the @code{dispatch} callback, which
+is invoked when begining to execute a section or a collapsed iteration in a
+@code{taskloop} or worksharing construct.  The additional calls are generated
+with static scheduling for the @code{distribute} and worksharing loop
+constructs.  Implies @option{-fopenmp-ompt} and requires @option{-fopenmp}.
 
 @opindex fopenmp-target-simd-clone
 @opindex fno-openmp-target-simd-clone
index 1e6bb80e0cedd5fd84120a0def0575814814311f..291f1fbd1a4b3d5d2bc2822c199bcd1a8c3dec4e 100644 (file)
@@ -363,7 +363,8 @@ to address of matching mapped list item per 5.1, Sect. 2.21.7.2 @tab N @tab
       @code{IMPORT}, and @code{IMPLICIT} as invalid @tab N @tab
 @item Optional comma between directive and clause in the @code{#pragma} form @tab Y @tab
 @item @code{indirect} clause in @code{declare target} @tab Y @tab
-@item @code{device_type(nohost)}/@code{device_type(host)} for variables @tab N @tab
+@item @code{device_type(nohost)}/@code{device_type(host)} for variables @tab P @tab
+      Initial support
 @item @code{present} modifier to the @code{map}, @code{to} and @code{from}
       clauses @tab Y @tab
 @item Changed interaction between @code{declare target} and OpenMP context