diff options
author | Jon Chesterfield <jonathanchesterfield@gmail.com> | 2022-03-19 16:10:05 +0000 |
---|---|---|
committer | Jon Chesterfield <jonathanchesterfield@gmail.com> | 2022-03-19 16:42:17 +0000 |
commit | 98e474c1b3210d90e313457bf6a6e39a7edb4d2b (patch) | |
tree | 39dee8b087dba676ea067a007d0d55af2c468750 /llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp | |
parent | a6c18bfbe39dc494d18fb8e66b16d0e292ed25e4 (diff) | |
download | llvm-98e474c1b3210d90e313457bf6a6e39a7edb4d2b.zip llvm-98e474c1b3210d90e313457bf6a6e39a7edb4d2b.tar.gz llvm-98e474c1b3210d90e313457bf6a6e39a7edb4d2b.tar.bz2 |
[amdgpu][nfc] Pass function instead of module to allocateModuleLDSGlobal
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp index 593388a..51642aa 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp @@ -61,7 +61,8 @@ unsigned AMDGPUMachineFunction::allocateLDSGlobal(const DataLayout &DL, return Offset; } -void AMDGPUMachineFunction::allocateModuleLDSGlobal(const Module *M) { +void AMDGPUMachineFunction::allocateModuleLDSGlobal(const Function &F) { + const Module *M = F.getParent(); if (isModuleEntryFunction()) { const GlobalVariable *GV = M->getNamedGlobal("llvm.amdgcn.module.lds"); if (GV) { |