[all-commits] [llvm/llvm-project] 30b7fd: [Flang][OpenMP] Minimize host ops remaining in dev...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Mon Aug 25 08:16:40 PDT 2025
Branch: refs/heads/users/skatrak/map-rework-03-rm-host-ops
Home: https://github.com/llvm/llvm-project
Commit: 30b7fd5427b890b72674610cf5181eb725575da2
https://github.com/llvm/llvm-project/commit/30b7fd5427b890b72674610cf5181eb725575da2
Author: Sergio Afonso <safonsof at amd.com>
Date: 2025-08-25 (Mon, 25 Aug 2025)
Changed paths:
M flang/include/flang/Optimizer/OpenMP/Passes.td
M flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
M flang/test/Lower/OpenMP/declare-target-link-tarop-cap.f90
M flang/test/Lower/OpenMP/host-eval.f90
M flang/test/Lower/OpenMP/real10.f90
A flang/test/Transforms/OpenMP/function-filtering-host-ops.mlir
A flang/test/Transforms/OpenMP/function-filtering.mlir
R flang/test/Transforms/omp-function-filtering.mlir
Log Message:
-----------
[Flang][OpenMP] Minimize host ops remaining in device compilation
This patch updates the function filtering OpenMP pass intended to remove host
functions from the MLIR module created by Flang lowering when targeting an
OpenMP target device.
Host functions holding target regions must be kept, so that the target regions
within them can be translated for the device. The issue is that non-target
operations inside these functions cannot be discarded because some of them hold
information that is also relevant during target device codegen. Specifically,
mapping information resides outside of `omp.target` regions.
This patch updates the previous behavior where all host operations were
preserved to then ignore all of those that are not actually needed by target
device codegen. This, in practice, means only keeping target regions and mapping
information needed by the device. Arguments for some of these remaining
operations are replaced by placeholder allocations and `fir.undefined`, since
they are only actually defined inside of the target regions themselves.
As a result, this set of changes makes it possible to later simplify target
device codegen, as it is no longer necessary to handle host operations
differently to avoid issues.
Commit: a68678ff5d712e93e882a4925bcef13aafac0fa8
https://github.com/llvm/llvm-project/commit/a68678ff5d712e93e882a4925bcef13aafac0fa8
Author: Sergio Afonso <safonsof at amd.com>
Date: 2025-08-25 (Mon, 25 Aug 2025)
Changed paths:
M flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
M flang/test/Transforms/OpenMP/function-filtering-host-ops.mlir
Log Message:
-----------
Remove omp.target[_{enter,exit}]_data and omp.targt_update operations from target device modules
Compare: https://github.com/llvm/llvm-project/compare/035cac0842e5...a68678ff5d71
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list