[PATCH] D57416: [AMDGPU] Support emitting GOT relocations for function calls

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 29 14:14:27 PST 2019


scott.linder created this revision.
scott.linder added reviewers: arsenm, kzhuravl, b-sumner, rampitec.
Herald added subscribers: llvm-commits, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely.

Currently we make this decision based on addrspace, with the rationale being that Private (and so Generic/Flat) can't meaningfully support relocations. Until recently functions could not have a non-default (i.e. non-Generic/Flat) addrspace at all, meaning we never emitted GOT relocations for functions.

The approach taken in this patch is to explicitly support GOT for functions, regardless of addrspace. We might instead consider whether addrspace is the correct way to make the decision in the first place. In the long term we may also wish to change the default addrspace of our functions.


Repository:
  rL LLVM

https://reviews.llvm.org/D57416

Files:
  lib/Target/AMDGPU/SIISelLowering.cpp
  test/CodeGen/AMDGPU/byval-frame-setup.ll
  test/CodeGen/AMDGPU/call-argument-types.ll
  test/CodeGen/AMDGPU/call-constexpr.ll
  test/CodeGen/AMDGPU/call-preserved-registers.ll
  test/CodeGen/AMDGPU/cross-block-use-is-not-abi-copy.ll
  test/CodeGen/AMDGPU/function-call-relocs.ll
  test/CodeGen/AMDGPU/ipra.ll
  test/CodeGen/AMDGPU/mem-builtins.ll
  test/CodeGen/AMDGPU/sibling-call.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57416.184166.patch
Type: text/x-patch
Size: 17091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190129/b942bb3b/attachment.bin>


More information about the llvm-commits mailing list