[PATCH] D92944: Don't setup inalloca for swiftcc on i686-windows-msvc

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 9 09:26:58 PST 2020


rnk created this revision.
rnk added reviewers: compnerd, rjmccall.
rnk requested review of this revision.
Herald added a project: clang.

Swiftcall does it's own target-independent argument type classification,
since it is not designed to be ABI compatible with anything local on the
target that isn't LLVM-based. This means it never uses inalloca.
However, we have duplicate logic for checking for inalloca parameters
that runs before call argument setup. This logic needs to know ahead of
time if inalloca will be used later, and we can't move the
CGFunctionInfo calculation earlier.

This change gets the calling convention from either the
FunctionProtoType or ObjCMethodDecl, checks if it is swift, and if so
skips the stackbase setup.

Depends on D92883 <https://reviews.llvm.org/D92883>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92944

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/test/CodeGenCXX/windows-x86-swiftcall.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92944.310565.patch
Type: text/x-patch
Size: 5430 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201209/e2d94e6a/attachment-0001.bin>


More information about the cfe-commits mailing list