[Patch] OpenMP: Update OMP_REQUIRES_TARGET_USED for declare_target + interop
Tobias Burnus
tburnus@baylibre.com
Tue Sep 24 22:23:46 GMT 2024
OpenMP mandates that when certain clauses are used with 'omp requires'
that in all compilation units this requires clause appears.
Those clauses influence the offloading behavior (+ potentially codegen);
hence, the must requires must match for those claues when device code is
involved. That's the case for device functions (in particular 'declare
target') and all OpenMP directives that take a 'device' clause.
Before OpenMP was rather vague, but in .e.g. TR13, it is fortunally more
explicit. Thus, this patch adds it for 'declare target' and it adds it
("device" clause!) for 'interop' (but only for Fortran as C/C++ still
does not support 'interop' directive plarsing.)
And comment before I commit it?
Tobias
PS: In TR13, page 321, lines 14–16 —
https://www.openmp.org/wp-content/uploads/openmp-TR13.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: target-used.diff
Type: text/x-patch
Size: 3010 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20240925/9115b701/attachment.bin>
More information about the Fortran
mailing list