[PATCH] D95443: IR/AArch64/X86: add "swifttailcc" calling convention.

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 06:51:58 PST 2021


t.p.northover created this revision.
Herald added subscribers: dexonsmith, danielkiss, pengfei, steven_wu, hiraditya, kristof.beyls, mcrosier.
t.p.northover requested review of this revision.
Herald added a project: LLVM.

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`.

Since the changes to support `tailcc` in AArch64 were virtually identical to supporting `swifttailcc` I decided it would be silly not to do that at the same time. I can split them up again for commit if people would prefer.


https://reviews.llvm.org/D95443

Files:
  llvm/docs/BitCodeFormat.rst
  llvm/docs/CodeGenerator.rst
  llvm/include/llvm/IR/CallingConv.h
  llvm/lib/AsmParser/LLLexer.cpp
  llvm/lib/AsmParser/LLParser.cpp
  llvm/lib/AsmParser/LLToken.h
  llvm/lib/CodeGen/Analysis.cpp
  llvm/lib/IR/AsmWriter.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.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/X86Subtarget.h
  llvm/test/Bitcode/compatibility.ll
  llvm/test/CodeGen/AArch64/swifttail-call.ll
  llvm/test/CodeGen/AArch64/tailcc-tail-call.ll
  llvm/test/CodeGen/ARM/swifttailcc.ll
  llvm/test/CodeGen/X86/swifttail-return.ll
  llvm/test/CodeGen/X86/tailcall-swifttailcc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95443.319285.patch
Type: text/x-patch
Size: 54690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210126/31a10a50/attachment.bin>


More information about the llvm-commits mailing list