[PATCH] D19756: Expand aggregate arguments more often on 32-bit Windows

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 29 18:14:02 PDT 2016


rnk created this revision.
rnk added reviewers: majnemer, hans.
rnk added a subscriber: cfe-commits.

Before this change, we would pass all non-HFA record arguments on
Windows with byval. Byval often blocks optimizations and results in bad
code generation. Windows now uses the existing workaround that other
x86_32 platforms use.

I also expanded the workaround handle C++ records with constructors on
Windows. On non-Windows platforms, we probably have to keep generating
the same LLVM IR prototypes if we want our bitcode to be ABI compatible.
Otherwise we will encounter mismatch issues like PR21573.

http://reviews.llvm.org/D19756

Files:
  lib/CodeGen/TargetInfo.cpp
  test/CodeGen/vectorcall.c
  test/CodeGen/windows-struct-abi.c
  test/CodeGen/x86_32-arguments-win32.c
  test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp
  test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19756.55695.patch
Type: text/x-patch
Size: 15301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160430/01589d51/attachment-0001.bin>


More information about the cfe-commits mailing list