[llvm-commits] [PATCH] Add support for fast calling convention

Jush Lu jush.msn at gmail.com
Mon Aug 13 04:59:54 PDT 2012


Hi,

fastcc uses FastCC_ARM_APCS (not CC_ARM_APCS) if targets don't support
AAPCS ABI, and FastCC_ARM_APCS is specific to fastcc, that is, if we merge
it into CallingConv::C, there will be extra checks caused
by FastCC_ARM_APCS when we handle CallingConv::C, but CallingConv::C
doesn't need these checks. In general, we use CallingConv::C much, and
fastcc is rare, this will be unnecessary overhead to CallingConv::C, and we
just move similar checks from fasctcc to CCC.

For the fast-isel-fastcc.patch attached in this email, I add test cases for
{VFP, noVFP} x {fastcc, no fastcc}, no changes for rest.

Jush

On Sat, Aug 11, 2012 at 2:20 AM, Renato Golin <rengolin at systemcall.org>wrote:

> On 10 August 2012 12:25, Jush Lu <jush.msn at gmail.com> wrote:
> > Hi all,
> >
> > As Renato's suggestion, I split the last patch into two patches.
>
> It was actually Chad's suggestion, I just agreed with him... :D
>
>
> > 'fast-isel-fastcc.patch' is for fix, and another is for clean up.
>
> The clean-up is harmless, and should pose no problems. However, it
> seems you ended up with two implementations of the same thing (sorry I
> missed that in the first review).
>
> AFAIK, fastcc in ARM is the same as AAPCS, so there is no point in
> having two similar logics for both. The original implementation,
> though, seemed to be wrong assuming "fastcc" (like CCC) should be
> default to APCS, rather than AAPCS.
>
> I think the best course of action is to common up the two
> implementations (ie. leave the fall through as it is), by adding
> yet-another test in the end (and on ABI check), taking (CC ==
> CallingConv::Fast) into consideration.
>
> And add the working version of the tests, for completeness.
>
> --
> cheers,
> --renato
>
> http://systemcall.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120813/f3d61536/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fast-isel-fastcc.patch
Type: application/octet-stream
Size: 3341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120813/f3d61536/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fast-isel-simplify-if.patch
Type: application/octet-stream
Size: 1155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120813/f3d61536/attachment-0001.obj>


More information about the llvm-commits mailing list