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)
commit3c55ccac4846ff2a0fbddec7e3440bd88e6e2d16
treeffb9faa07a74d6827011e872d77cffb2a46d54e7
parent2f206d6ee4404c6511826cd47cfebbfea293ba59
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.

llvm-svn: 222903
llvm/include/llvm/CodeGen/CallingConvLower.h
llvm/include/llvm/IR/DataLayout.h
llvm/lib/Target/AArch64/AArch64CallingConvention.h [new file with mode: 0644]
llvm/lib/Target/AArch64/AArch64CallingConvention.td
llvm/lib/Target/AArch64/AArch64FastISel.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/lib/Target/ARM/ARMCallingConv.h
llvm/test/CodeGen/AArch64/argument-blocks.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/arm64-variadic-aapcs.ll