[all-commits] [llvm/llvm-project] a59c4f: [Flang][OpenMP] Add global address space to global...
agozillon via All-commits
all-commits at lists.llvm.org
Wed Dec 11 08:48:49 PST 2024
Branch: refs/heads/users/agozillo/declare-target-to-2
Home: https://github.com/llvm/llvm-project
Commit: a59c4fbdb3daeaf1f11a96a0d658c6aae4e5b7dc
https://github.com/llvm/llvm-project/commit/a59c4fbdb3daeaf1f11a96a0d658c6aae4e5b7dc
Author: agozillon <Andrew.Gozillon at amd.com>
Date: 2024-12-11 (Wed, 11 Dec 2024)
Changed paths:
M flang/include/flang/Optimizer/Builder/FIRBuilder.h
M flang/include/flang/Optimizer/CodeGen/FIROpPatterns.h
M flang/lib/Optimizer/Builder/FIRBuilder.cpp
M flang/lib/Optimizer/CodeGen/CodeGen.cpp
M flang/lib/Optimizer/CodeGen/FIROpPatterns.cpp
M flang/test/Fir/convert-to-llvm.fir
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Log Message:
-----------
[Flang][OpenMP] Add global address space to globals for target device
Currently we do not add the appropriate global address space to globals on the target device
pass, this PR attempts to add at least a preliminary number of these address spaces markings
and then add the appropriate casts where neccesary (from global to program primarily).
This allows for more correct IR that the backends (in particular AMDGPU) can treat more
aptly for optimisations and code correctness.
Commit: 52734c279978ef3bb4c9c06ef48a0cdf12878141
https://github.com/llvm/llvm-project/commit/52734c279978ef3bb4c9c06ef48a0cdf12878141
Author: agozillon <Andrew.Gozillon at amd.com>
Date: 2024-12-11 (Wed, 11 Dec 2024)
Changed paths:
M flang/test/Integration/OpenMP/map-types-and-sizes.f90
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
M mlir/test/Target/LLVMIR/omptarget-data-use-dev-ordering.mlir
A mlir/test/Target/LLVMIR/omptarget-overlapping-record-member-map.mlir
M mlir/test/Target/LLVMIR/omptarget-record-type-with-ptr-member-host.mlir
A offload/test/offloading/fortran/dtype-member-overlap-map.f90
Log Message:
-----------
[MLIR][OpenMP] Introduce overlapped record type map support
This PR introduces a new additional type of map lowering for record types that Clang currently supports, in which a user can map a top-level record type and then individual members with different mapping, effectively creating a sort of "overlapping" mapping that we attempt to cut around.
This is currently most predominantly used in Fortran, when mapping descriptors and there data, we map the descriptor and its data with separate map modifiers and "cut around" the pointer data, so that wedo not overwrite it unless the runtime deems it a neccesary action based on its reference counting mechanism. However, it is a mechanism that will come in handy/trigger when a user explitily maps a record type (derived type or structure) and then explicitly maps a member with a different map type.
These additions were predominantly in the OpenMPToLLVMIRTranslation.cpp file and phase, however, one Flang test that checks end-to-end IR compilation (as far as we care for now at least) was altered.
2/3 required PRs to enable declare target to mapping, should look at PR 3/3 to check for full green passes (this one will fail a number due to some dependencies).
Co-authored-by: Raghu Maddhipatla raghu.maddhipatla at amd.com
Compare: https://github.com/llvm/llvm-project/compare/a59c4fbdb3da%5E...52734c279978
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