Message ID | 87a85079-ccab-4e04-ab92-fbaac359b4d7@baylibre.com |
---|---|
State | New |
Headers | show |
Series | libgomp/libgomp.texi: Mention -fno-builtin-omp_is_initial_device (was: Re: [PATCH, v3] OpenMP: Constructors and destructors for "declare target" static aggregates) | expand |
On Thu, Aug 08, 2024 at 02:18:48PM +0200, Tobias Burnus wrote: > Document -fno-builtin-omp_is_initial_device as discussed: > > Jakub Jelinek wrote: > > > RFC: Should be document this new built-in some where? If so, where? As part > > > of the routine description in libgomp.texi? Or in extend.texi (or even > > > invoke.texi)? > > I think libgomp.texi in the omp_is_initial_device description, mention > > that the compiler folds it by default and that if that is undesirable, > > there is this option to use. > > Unless there are wording suggestions, I will commit it later today. > > Tobias > libgomp/libgomp.texi: Mention -fno-builtin-omp_is_initial_device > > libgomp/ChangeLog: > > * libgomp.texi (omp_is_initial_device): Mention > -fno-builtin-omp_is_initial_device and folding by default. LGTM. Jakub
On 8/8/24 06:20, Jakub Jelinek wrote: > On Thu, Aug 08, 2024 at 02:18:48PM +0200, Tobias Burnus wrote: >> Document -fno-builtin-omp_is_initial_device as discussed: >> >> Jakub Jelinek wrote: >>>> RFC: Should be document this new built-in some where? If so, where? As part >>>> of the routine description in libgomp.texi? Or in extend.texi (or even >>>> invoke.texi)? >>> I think libgomp.texi in the omp_is_initial_device description, mention >>> that the compiler folds it by default and that if that is undesirable, >>> there is this option to use. >> >> Unless there are wording suggestions, I will commit it later today. >> >> Tobias > >> libgomp/libgomp.texi: Mention -fno-builtin-omp_is_initial_device >> >> libgomp/ChangeLog: >> >> * libgomp.texi (omp_is_initial_device): Mention >> -fno-builtin-omp_is_initial_device and folding by default. > > LGTM. Me too. -Sandra
libgomp/libgomp.texi: Mention -fno-builtin-omp_is_initial_device libgomp/ChangeLog: * libgomp.texi (omp_is_initial_device): Mention -fno-builtin-omp_is_initial_device and folding by default. diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index c6759dd03bc..96cc0e4baa8 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -1754,6 +1754,10 @@ This function returns @code{true} if currently running on the host device, @code{false} otherwise. Here, @code{true} and @code{false} represent their language-specific counterparts. +Note that in GCC this value is already folded to a constant in the compiler; +compile with @option{-fno-builtin-omp_is_initial_device} if a run-time function +is desired. + @item @emph{C/C++}: @multitable @columnfractions .20 .80 @item @emph{Prototype}: @tab @code{int omp_is_initial_device(void);}