[PATCH] D67028: Use musttail for variadic method thunks when possible

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 30 17:06:25 PDT 2019


rnk created this revision.
rnk added reviewers: rsmith, hans, efriedma.
Herald added a subscriber: fedor.sergeev.
Herald added a project: clang.

This avoids cloning variadic virtual methods when the target supports
musttail and the return type is not covariant. I think we never
implemented this previously because it doesn't handle the covariant
case. But, in the MS ABI, there are some cases where vtable thunks must
be emitted even when the variadic method defintion is not available, so
it looks like we need to implement this. Do it for both ABIs, since it's
a nice size improvement and simplification for Itanium.

Fixes PR43173.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67028

Files:
  clang/lib/CodeGen/CGVTables.cpp
  clang/test/CodeGenCXX/linetable-virtual-variadic.cpp
  clang/test/CodeGenCXX/thunks-variadic-covariant.cpp
  clang/test/CodeGenCXX/thunks-variadic.cpp
  clang/test/CodeGenCXX/thunks.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67028.218191.patch
Type: text/x-patch
Size: 9156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190831/f6f7a266/attachment.bin>


More information about the cfe-commits mailing list