[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 Jul 6 18:25:38 PDT 2017
sfertile marked 2 inline comments as done.
sfertile added inline comments.
================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:4252
+ return !TT.isOSDarwin() &&
+ (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le);
+ case CodeModel::Small:
----------------
sfertile wrote:
> inouehrs wrote:
> > In my understanding, ELFv1 uses small code model (please consult with ABI document). If so we need to check ELFv2 ABI.
> I thought the V1 ABI used small code model for 32 bit and medium code model for 64 bit, but I'll double check.
I dug through the 'V1.9 64 bit ELF ABI supplement ' as well as the older '[32-bit] PowerPC Processor Supplement' and neither mention what code model should be used by default. I think I originally used the gcc docs to infer that ppc64 defaults to medium code model:
[[ https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html | IBM RS/6000 and PowerPC Options ]]
> -mcmodel=medium
> Generate PowerPC64 code for the medium model: The TOC and other static data may be up to a total of 4G in size. This is the default for 64-bit Linux.
and then found 'adjustCodeGenOpts' in PPCMCTargetDesc.cpp which confirmed it.
Repository:
rL LLVM
https://reviews.llvm.org/D34245
More information about the llvm-commits
mailing list