AArch64: treat [N x Ty] as a block during procedure calls.
authorTim Northover <tnorthover@apple.com>
Thu, 27 Nov 2014 21:02:42 +0000 (21:02 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 27 Nov 2014 21:02:42 +0000 (21:02 +0000)
commitd7a4f74f15f8cff2b2b38a33e6027209ea3796f3
tree15a4d7c1a970a3f0e0bf7a4c10a970d253a44d32
parent7dc6143a82e80316b70fbcc082155abd62c6b7f6
AArch64: treat [N x Ty] as a block during procedure calls.

The AAPCS treats small structs and homogeneous floating (or vector) aggregates
specially, and guarantees they either get passed as a contiguous block of
registers, or prevent any future use of those registers and get passed on the
stack.

This concept can fit quite neatly into LLVM's own type system, mapping an HFA
to [N x float] and so on, and small structs to [N x i64]. Doing so allows
front-ends to emit AAPCS compliant code without having to duplicate the
register counting logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222903 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/CallingConvLower.h
include/llvm/IR/DataLayout.h
lib/Target/AArch64/AArch64CallingConvention.h [new file with mode: 0644]
lib/Target/AArch64/AArch64CallingConvention.td
lib/Target/AArch64/AArch64FastISel.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/AArch64/AArch64ISelLowering.h
lib/Target/ARM/ARMCallingConv.h
test/CodeGen/AArch64/argument-blocks.ll [new file with mode: 0644]
test/CodeGen/AArch64/arm64-variadic-aapcs.ll