[PowerPC] Initial PPC64 calling-convention changes for fastcc
authorHal Finkel <hfinkel@anl.gov>
Sun, 18 Jan 2015 12:08:47 +0000 (12:08 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 18 Jan 2015 12:08:47 +0000 (12:08 +0000)
commita01b583dbc82bb41a5615ceddd2d2c99972aa65e
treec9e724015b28162f5c4f31336f54e3f7998f2cc1
parent5817eaff8fdc6d2e516278184f14142f9ca9f8fa
[PowerPC] Initial PPC64 calling-convention changes for fastcc

The default calling convention specified by the PPC64 ELF (V1 and V2) ABI is
designed to work with both prototyped and non-prototyped/varargs functions. As
a result, GPRs and stack space are allocated for every argument, even those
that are passed in floating-point or vector registers.

GlobalOpt::OptimizeFunctions will transform local non-varargs functions (that
do not have their address taken) to use the 'fast' calling convention.

When functions are using the 'fast' calling convention, don't allocate GPRs for
arguments passed in other types of registers, and don't allocate stack space for
arguments passed in registers. Other changes for the fast calling convention
may be added in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226399 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCFastISel.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
test/CodeGen/PowerPC/ppc64-fastcc-fast-isel.ll [new file with mode: 0644]
test/CodeGen/PowerPC/ppc64-fastcc.ll [new file with mode: 0644]