diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-07-18 16:44:56 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-07-18 16:44:56 +0000 |
commit | 1cc47f8413b38f075bbc7a1e0e38ead00700efdf (patch) | |
tree | 8ad86186d4c581218cf8c44e8a8368c01c4f77cb /llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h | |
parent | 9962faed2b3019dd97676127f2e71a2cc3d7c26e (diff) | |
download | bcm5719-llvm-1cc47f8413b38f075bbc7a1e0e38ead00700efdf.tar.gz bcm5719-llvm-1cc47f8413b38f075bbc7a1e0e38ead00700efdf.zip |
AMDGPU: Figure out private memory regs after lowering
Introduce pseudo-registers for registers needed for stack
access, which are replaced during finalizeLowering.
Note these pseudo-registers are currently only used for the
used register location, and not for determining their
input argument register.
This is better because it avoids the need to try to predict
whether a call will be emitted from the IR, and also
detects stack objects introduced by legalization.
Test changes are from the HasStackObjects check being more
accurate since stack objects introduced during legalization
are now known.
llvm-svn: 308325
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h index a9a229dfb35..4c7f38a09a4 100644 --- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h +++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h @@ -382,10 +382,13 @@ public: } void setStackPtrOffsetReg(unsigned Reg) { - assert(Reg != AMDGPU::NoRegister && "Should never be unset"); StackPtrOffsetReg = Reg; } + // Note the unset value for this is AMDGPU::SP_REG rather than + // NoRegister. This is mostly a workaround for MIR tests where state that + // can't be directly computed from the function is not preserved in serialized + // MIR. unsigned getStackPtrOffsetReg() const { return StackPtrOffsetReg; } |