Expand aggregate arguments more often on 32-bit Windows
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 to handle C++ records with constructors on Windows. On non-Windows platforms, we 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. Essentially fixes PR27522 in Clang instead of LLVM. Reviewers: hans Differential Revision: http://reviews.llvm.org/D19756 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268261 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/CodeGen/TargetInfo.cpp 89 additions, 83 deletionslib/CodeGen/TargetInfo.cpp
- test/CodeGen/vectorcall.c 2 additions, 2 deletionstest/CodeGen/vectorcall.c
- test/CodeGen/windows-struct-abi.c 3 additions, 3 deletionstest/CodeGen/windows-struct-abi.c
- test/CodeGen/x86_32-arguments-win32.c 3 additions, 3 deletionstest/CodeGen/x86_32-arguments-win32.c
- test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp 2 additions, 2 deletionstest/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp
- test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp 26 additions, 5 deletionstest/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
Loading
Please register or sign in to comment