[PATCH] D34245: [PowerPC] Refine the checking for emiting TOC restore nops and Tail-Call eligibility.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 11:56:28 PDT 2017


sfertile created this revision.

In the Small code-model the linker will allocate multiple TOC bases for modules with TOCs that overflow a 16 byte offset. If this happens then all the issues with cross-module calls apply to calls within the same module but with different TOC bases. Since we don't know at compile time where the linker will decide to split the module we can only treat calls within the same section as 'local'.  The medium and large code models are expected to provide a sufficiently large TOC to provide all data addressing needs of a module with a single TOC, and so we only need to check if a callee is local to the same module as the caller.


Repository:
  rL LLVM

https://reviews.llvm.org/D34245

Files:
  lib/Target/PowerPC/PPCISelLowering.cpp
  test/CodeGen/PowerPC/ppc64-blnop.ll
  test/CodeGen/PowerPC/ppc64-calls.ll
  test/CodeGen/PowerPC/ppc64-sibcall.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34245.102695.patch
Type: text/x-patch
Size: 8654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170615/23562a75/attachment.bin>


More information about the llvm-commits mailing list