]> granicus.if.org Git - clang/commit
Use less byval on 32-bit Windows x86 for classes with bases
authorReid Kleckner <rnk@google.com>
Fri, 13 Jan 2017 17:18:19 +0000 (17:18 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 13 Jan 2017 17:18:19 +0000 (17:18 +0000)
commit0bfbb554f7bb934a7e8e5c4143eb4502d730e0a7
treebf933ebd46305af5a18ab071775a4b894b4bb07c
parent929915770e6474d63715409734cbccefd9bcb87a
Use less byval on 32-bit Windows x86 for classes with bases

This comes up in V8, which has a Handle template class that wraps a
typed pointer, and is frequently passed by value. The pointer is stored
in the base, HandleBase. This change allows us to pass the struct as a
pointer instead of using byval. This avoids creating tons of temporary
allocas that we copy from during call lowering.

Eventually, it would be good to use FCAs here instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291917 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetInfo.cpp
test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp