OpenMP dispatch builtins use fewer arguments for OMPT
OpenMP dispatch builtins now use a 2-argument form for OMPT, simplifying data passing.
The GOMP_distribute_static_worksharing_dispatch and GOMP_loop_static_worksharing_dispatch builtins no longer pass loop bounds to OMPT. Instead, they pass the starting chunk and iteration count, which is the minimal information OMPT requires. This change simplifies the internal implementation and the external interface for OpenMP task offloading events.
In Details
The libgomp runtime uses OMPT (OpenMP Tools Interface) for instrumentation. This commit refactors the dispatch builtins to use a simplified 2-argument signature for OMPT callbacks, replacing the previous 5-argument form. This aligns the builtin signature with the actual information needed by OMPT, reducing complexity in the runtime and compiler's lowering passes.
- OMPT
- OpenMP Tools Interface, a standard API for tool developers to observe and control OpenMP runtimes. It allows tools to receive callbacks for various OpenMP events, such as task creation, loop worksharing, and synchronization.
- dispatch builtins
- Compiler-generated functions that implement OpenMP worksharing constructs like 'distribute' and 'loop'. They are responsible for managing the distribution of iterations among threads and interacting with the runtime library.
- libgomp
- The GNU Offloading and Math Kernel Library, which provides the runtime support for OpenMP in GCC. It manages thread pools, worksharing, and other OpenMP-specific functionalities.