diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h index 48cf46b5f871..df62c2314617 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h @@ -12,6 +12,10 @@ #include "Utils/AMDGPUBaseInfo.h" #include "llvm/ADT/DenseMap.h" #include "llvm/CodeGen/MachineFunction.h" +#include "llvm/IR/DataLayout.h" +#include "llvm/IR/GlobalValue.h" +#include "llvm/IR/GlobalVariable.h" +#include "llvm/IR/Function.h" namespace llvm { @@ -25,11 +29,13 @@ protected: Align MaxKernArgAlign; // Cache for this. /// Number of bytes in the LDS that are being used. - unsigned LDSSize = 0; + uint32_t LDSSize = 0; + uint32_t GDSSize = 0; /// Number of bytes in the LDS allocated statically. This field is only used /// in the instruction selector and not part of the machine function info. - unsigned StaticLDSSize = 0; + uint32_t StaticLDSSize = 0; + uint32_t StaticGDSSize = 0; /// Align for dynamic shared memory if any. Dynamic shared memory is /// allocated directly after the static one, i.e., LDSSize. Need to pad @@ -63,12 +69,16 @@ public: return ExplicitKernArgSize; } - unsigned getMaxKernArgAlign() const { return MaxKernArgAlign.value(); } + Align getMaxKernArgAlign() const { return MaxKernArgAlign; } - unsigned getLDSSize() const { + uint32_t getLDSSize() const { return LDSSize; } + uint32_t getGDSSize() const { + return GDSSize; + } + AMDGPU::SIModeRegisterDefaults getMode() const { return Mode; } @@ -92,7 +102,7 @@ public: } unsigned allocateLDSGlobal(const DataLayout &DL, const GlobalVariable &GV); - void allocateModuleLDSGlobal(const Module *M); + void allocateModuleLDSGlobal(const Function &F); Align getDynLDSAlign() const { return DynLDSAlign; } |
