]> granicus.if.org Git - llvm/commit
AMDGPU: Expand frame indexes to be relative to scratch wave offset
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 17 May 2017 21:23:14 +0000 (21:23 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 17 May 2017 21:23:14 +0000 (21:23 +0000)
commita799ff4e4f17035b4f6c4b40b5ca2d0ce4ea8cef
treeac449e204d8d44e6418ca6da3540bbab28a4cb0e
parent64444b4dcc81be60750dcc317529716266d2343c
AMDGPU: Expand frame indexes to be relative to scratch wave offset

In order for an arbitrary callee to access an object
in a caller's stack frame, the 32-bit offset used as
the private pointer needs to be relative to the kernel's
scratch wave offset register.

Convert to this by finding the difference from the current
stack frame and scaling by the wavefront size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303303 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIRegisterInfo.cpp