Landing: 97a43fc4dbc5
Project / Subsystem
gcc / openmp
Date
2026-07-14
Author
Tobias Burnus
Commit
97a43fc4dbc5cfb1174a13313dda7637c838d110
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- openmp
- patch_id
- —
- commit_hash
- 97a43fc4dbc5cfb1174a13313dda7637c838d110
- source_type
- github
- headline
- Handle 'device_type(nohost)' in OpenMP target regions
- tldr
- OpenMP target regions now support the `device_type(nohost)` clause for offloading, enabling code execution only on devices.
- author
- Tobias Burnus
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • openmp
- • offloading
- • compiler
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-14T00:00:00.000Z
This commit adds support for the device_type(nohost) clause in OpenMP target regions. It modifies the middle-end to generate code that uses the omp_is_initial_device intrinsic, which is evaluated at compile time. This ensures that only the device-specific code is compiled for nohost regions, while host code is omitted, simplifying offloading constructs.