summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2018-06-28 10:18:55 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2018-06-28 10:18:55 +0000
commit75e7192ba321da26bd1867b496dc0bbac1bb7c64 (patch)
treed3c65b92c27598c3e97b2d319fe4e7ad6a8ff196 /llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
parent1fb90133681255d38eed5c75c0fb64c9b090a7f5 (diff)
downloadbcm5719-llvm-75e7192ba321da26bd1867b496dc0bbac1bb7c64.tar.gz
bcm5719-llvm-75e7192ba321da26bd1867b496dc0bbac1bb7c64.zip
AMDGPU: Remove MFI::ABIArgOffset
We have too many mechanisms for tracking the various offsets used for kernel arguments, so remove one. There's still a lot of confusion with these because there are two different "implicit" argument areas located at the beginning and end of the kernarg segment. Additionally, the offset was determined based on the memory size of the split element types. This would break in a future commit where v3i32 is decomposed into separate i32 pieces. llvm-svn: 335830
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h26
1 files changed, 8 insertions, 18 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
index bcc0e77a545..d9c0ed91c52 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
@@ -15,22 +15,20 @@
namespace llvm {
+class AMDGPUSubtarget;
+
class AMDGPUMachineFunction : public MachineFunctionInfo {
/// A map to keep track of local memory objects and their offsets within the
/// local memory space.
SmallDenseMap<const GlobalValue *, unsigned, 4> LocalMemoryObjects;
protected:
- uint64_t KernArgSize;
+ uint64_t ExplicitKernArgSize;
unsigned MaxKernArgAlign;
/// Number of bytes in the LDS that are being used.
unsigned LDSSize;
- // FIXME: This should probably be removed.
- /// Start of implicit kernel args
- unsigned ABIArgOffset;
-
// Kernels + shaders. i.e. functions called by the driver and not called
// by other functions.
bool IsEntryFunction;
@@ -48,31 +46,23 @@ public:
uint64_t allocateKernArg(uint64_t Size, unsigned Align) {
assert(isPowerOf2_32(Align));
- KernArgSize = alignTo(KernArgSize, Align);
+ ExplicitKernArgSize = alignTo(ExplicitKernArgSize, Align);
- uint64_t Result = KernArgSize;
- KernArgSize += Size;
+ uint64_t Result = ExplicitKernArgSize;
+ ExplicitKernArgSize += Size;
MaxKernArgAlign = std::max(Align, MaxKernArgAlign);
return Result;
}
- uint64_t getKernArgSize() const {
- return KernArgSize;
+ uint64_t getExplicitKernArgSize() const {
+ return ExplicitKernArgSize;
}
unsigned getMaxKernArgAlign() const {
return MaxKernArgAlign;
}
- void setABIArgOffset(unsigned NewOffset) {
- ABIArgOffset = NewOffset;
- }
-
- unsigned getABIArgOffset() const {
- return ABIArgOffset;
- }
-
unsigned getLDSSize() const {
return LDSSize;
}
OpenPOWER on IntegriCloud