IR/AArch64/X86: add "swifttailcc" calling convention.
authorTim Northover <t.p.northover@gmail.com>
Thu, 19 Nov 2020 12:32:50 +0000 (12:32 +0000)
committerTim Northover <t.p.northover@gmail.com>
Mon, 17 May 2021 09:48:34 +0000 (10:48 +0100)
commit82a0e808bb2cddc1ce508c6ae654f8350b082256
tree2fbecbf136a18c9abb8f6999f8d93d2cb8591254
parent1d9e8e13dd7b3204fa51ada17d1608bdbd1bed66
IR/AArch64/X86: add "swifttailcc" calling convention.

Swift's new concurrency features are going to require guaranteed tail calls so
that they don't consume excessive amounts of stack space. This would normally
mean "tailcc", but there are also Swift-specific ABI desires that don't
naturally go along with "tailcc" so this adds another calling convention that's
the combination of "swiftcc" and "tailcc".

Support is added for AArch64 and X86 for now.
34 files changed:
llvm/docs/BitCodeFormat.rst
llvm/docs/CodeGenerator.rst
llvm/docs/LangRef.rst
llvm/include/llvm/AsmParser/LLToken.h
llvm/include/llvm/IR/CallingConv.h
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/CodeGen/Analysis.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/Target/AArch64/AArch64CallingConvention.td
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/X86/X86CallingConv.td
llvm/lib/Target/X86/X86FastISel.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86RegisterInfo.cpp
llvm/lib/Target/X86/X86Subtarget.h
llvm/test/Bitcode/compatibility.ll
llvm/test/CodeGen/AArch64/swift-async.ll
llvm/test/CodeGen/AArch64/swifttail-async.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/swifttail-call.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/tail-call.ll
llvm/test/CodeGen/AArch64/tailcc-tail-call.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/swifttail-async-i386.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/swifttail-async.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/swifttail-return.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/tailcall-swifttailcc.ll [new file with mode: 0644]
llvm/utils/emacs/llvm-mode.el
llvm/utils/vim/syntax/llvm.vim