diff options
author | agozillon <Andrew.Gozillon@amd.com> | 2024-01-17 17:37:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-17 17:37:16 +0100 |
commit | abeb6c9f58f69a7e8395ea4a84a0e6f6889eaf78 (patch) | |
tree | 7c307829870fe9f2e3fd627456a03433ab002c37 /llvm/lib/Object/WasmObjectFile.cpp | |
parent | 509f634f76caa40d522875e17188ca77df9159b5 (diff) | |
download | llvm-abeb6c9f58f69a7e8395ea4a84a0e6f6889eaf78.zip llvm-abeb6c9f58f69a7e8395ea4a84a0e6f6889eaf78.tar.gz llvm-abeb6c9f58f69a7e8395ea4a84a0e6f6889eaf78.tar.bz2 |
[Flang][MLIR] Add basic initial support for alloca and program address space handling in FIR->LLVMIR codegen (#77518)
This is a slightly more slimmed down and up-to-date version of the older
PR from here: https://reviews.llvm.org/D144203, written by @jsjodin,
which has already under gone some review.
This PR places allocas in the alloca address space specified by the
provided data layout (default is 0 for all address spaces, unless
explicitly specified by the layout), and then will cast these alloca's
to the program address space if this address space is different from the
allocation address space. For most architectures data layouts, this will
be a no-op, as they have a flat address space. But in the case of AMDGPU
it will result in allocas being placed in the correct address space (5,
private), and then casted into the correct program address space (0,
generic). This results in correct (partially, a follow up PR will be
forthcoming soon) generation of allocations inside of device code.
This PR is in addition to the work by @skatrak in this PR:
https://github.com/llvm/llvm-project/pull/69599 and adds seperate and
neccesary functionality of casting alloca's from their address space to
the program address space, both are independent PRs, although there is
some minor overlap e.g. this PR incorporates some of the useful helper
functions from 69599, so whichever lands first will need a minor rebase.
Co-author: jsjodin
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions