https://gcc.gnu.org/g:cfb1d8314830af6a4121159dc59fbf03ff00c525

commit r17-2499-gcfb1d8314830af6a4121159dc59fbf03ff00c525
Author: Tobias Burnus <[email protected]>
Date:   Fri Jul 17 17:19:46 2026 +0200

    OpenMP: docs - improve -fopenmp-ompt(-detailed) description + update impl. 
status
    
    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'.

Diff:
---
 gcc/doc/invoke.texi  | 22 ++++++++++++++--------
 libgomp/libgomp.texi |  3 ++-
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 739fc77c282b..2c2ed1a003fe 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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
diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi
index 1e6bb80e0ced..291f1fbd1a4b 100644
--- a/libgomp/libgomp.texi
+++ b/libgomp/libgomp.texi
@@ -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

Reply via email to