[flang-commits] [flang] [mlir] [flang][OpenMP] Ignore target-data operations with no offload targets (PR #144534)
Sergio Afonso via flang-commits
flang-commits at lists.llvm.org
Tue Jun 17 09:08:41 PDT 2025
https://github.com/skatrak commented:
Thank you Krzysztof!
> When no offload targets are specified flang will ignore "target" constructs, but not "target data" constructs.
To point something out, this is not exactly what happens. Host implementations of target constructs will still be produced regardless of whether offload targets were specified. The difference when they aren't is that no kernel launches (i.e. `__tgt_target_kernel` plus kernel argument structure setup) are produced in the host, but rather host fallback code is branched to directly.
Having said that, I can't imagine why we would need to keep "target data"-related runtime calls when there's no offloading target, so the approach sounds good to me. Maybe it would be good for someone more familiar with current map support to confirm the removal of `__tgt_target_data_{begin,end}_mapper` is fine when running only on the host (CC: @agozillon, @TIFitis).
https://github.com/llvm/llvm-project/pull/144534
More information about the flang-commits
mailing list