diff options
author | Jon Chesterfield <jonathanchesterfield@gmail.com> | 2023-03-12 13:47:40 +0000 |
---|---|---|
committer | Jon Chesterfield <jonathanchesterfield@gmail.com> | 2023-03-12 13:47:48 +0000 |
commit | d3dda422bfd1dc281df944b4a07bcd6816e2ee94 (patch) | |
tree | 48719850f51d2b45e202b37796bdd256da4b1316 /llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h | |
parent | c4918cbf3ba3f6f0caefae3f283b5c05c3baf7ec (diff) | |
download | llvm-d3dda422bfd1dc281df944b4a07bcd6816e2ee94.zip llvm-d3dda422bfd1dc281df944b4a07bcd6816e2ee94.tar.gz llvm-d3dda422bfd1dc281df944b4a07bcd6816e2ee94.tar.bz2 |
[amdgpu][nfc] Replace ad hoc LDS frame recalculation with absolute_symbol MD
Post ISel, LDS variables are absolute values. Representing them as
such is simpler than the frame recalculation currently used to build assembler
tables from their addresses.
This is a precursor to lowering dynamic/external LDS accesses from non-kernel
functions.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D144221
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h')
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h index f27f825..ba4c55a 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h @@ -106,20 +106,8 @@ public: void allocateKnownAddressLDSGlobal(const Function &F); - // A kernel function may have an associated LDS allocation, and a kernel-scope - // LDS allocation must have an associated kernel function - - // LDS allocation should have an associated kernel function - static const Function * - getKernelLDSFunctionFromGlobal(const GlobalVariable &GV); - static const GlobalVariable * - getKernelLDSGlobalFromFunction(const Function &F); - - // Module or kernel scope LDS variable - static bool isKnownAddressLDSGlobal(const GlobalVariable &GV); - static unsigned calculateKnownAddressOfLDSGlobal(const GlobalVariable &GV); - static std::optional<uint32_t> getLDSKernelIdMetadata(const Function &F); + static std::optional<uint32_t> getLDSAbsoluteAddress(const GlobalValue &GV); Align getDynLDSAlign() const { return DynLDSAlign; } |