hanchenye-llvm-project/llvm
Bill Schmidt 9953cf294b This patch addresses an ABI compatibility issue with empty aggregate
parameters.  Examples of these are:

  struct { } a;
  union { } b[256];
  int a[0];

An empty aggregate has an address, although dereferencing that address is
pointless.  When passed as a parameter, an empty aggregate does not consume
a protocol register, nor does it consume a doubleword in the parameter save
area.  Passing an empty aggregate by reference passes an address just as
for any other aggregate.  Returning an empty aggregate uses GPR3 as a hidden
address of the return value location, just as for any other aggregate.

The patch modifies PPCTargetLowering::LowerFormalArguments_64SVR4 and
PPCTargetLowering::LowerCall_64SVR4 to properly skip empty aggregate
parameters passed by value.  The handling of return values and by-reference
parameters was already correct.

Built on powerpc64-unknown-linux-gnu and tested with no new regressions.
A test case is included to test proper handling of empty aggregate
parameters on both sides of the function call protocol.

llvm-svn: 167090
2012-10-31 01:15:05 +00:00
..
autoconf Add mips64-* and mips64el-* triples to configure scripts 2012-10-29 19:49:45 +00:00
bindings Fix a build error for ocaml bindings that was introduced with the TargetData --> DataLayout changes. 2012-10-19 20:36:22 +00:00
cmake CMake: Include private headers / tablegen files in generated Xcode projects. 2012-10-23 21:36:55 +00:00
docs Typo. 2012-10-29 21:49:46 +00:00
examples Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this! 2012-10-24 17:25:11 +00:00
include xlc supports __attribute__((aligned(x))), use it. 2012-10-31 00:54:26 +00:00
lib This patch addresses an ABI compatibility issue with empty aggregate 2012-10-31 01:15:05 +00:00
projects Add mips64-* and mips64el-* triples to configure scripts 2012-10-29 19:49:45 +00:00
runtime Place temporary LTO files into their own subdirectory. 2012-10-10 05:29:15 +00:00
test This patch addresses an ABI compatibility issue with empty aggregate 2012-10-31 01:15:05 +00:00
tools Align the data section correctly when loading an ELF file. 2012-10-29 10:47:07 +00:00
unittests Fix isEliminableCastPair to work correctly in the presence of pointers 2012-10-30 16:03:32 +00:00
utils Don't return false when the function's return type is a pointer. 2012-10-25 21:25:08 +00:00
.gitignore Add extra vim swap file pattern 2012-10-09 23:48:34 +00:00
CMakeLists.txt Removing dependency on third party library for Intel JIT event support. 2012-09-28 17:35:20 +00:00
CODE_OWNERS.TXT Add the list of code owners to the top level of the LLVM source tree to 2012-07-26 08:04:09 +00:00
CREDITS.TXT Move TargetData to DataLayout. 2012-10-08 16:40:38 +00:00
LICENSE.TXT
LLVMBuild.txt
Makefile Don't try to install c-index-test with BUILD_CLANG_ONLY. rdar://12492703 2012-10-24 22:56:32 +00:00
Makefile.common [docs] Remove unsupported references to ExtraSource variable. 2012-05-15 21:32:27 +00:00
Makefile.config.in Re-enable support for --program-prefix. 2012-10-01 18:40:32 +00:00
Makefile.rules Use MACOSX_DEPLOYMENT_TARGET when it is set. <rdar://problem/12433905> 2012-10-12 21:48:14 +00:00
README.txt test commit 2012-07-11 17:34:12 +00:00
configure Add mips64-* and mips64el-* triples to configure scripts 2012-10-29 19:49:45 +00:00
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.