[llvm-branch-commits] [llvm-gcc-branch] r90983 - /llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Wed Dec 9 11:37:23 PST 2009
Author: void
Date: Wed Dec 9 13:37:23 2009
New Revision: 90983
URL: http://llvm.org/viewvc/llvm-project?rev=90983&view=rev
Log:
Temporary revert:
$ svn merge -c -90914 https://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk
--- Reverse-merging r90914 into '.':
U gcc/llvm-convert.cpp
Modified:
llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp?rev=90983&r1=90982&r2=90983&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp Wed Dec 9 13:37:23 2009
@@ -2776,26 +2776,8 @@
return 0;
if (Client.isAggrReturn()) {
- if (TD.getTypeAllocSize(Call->getType()) <= TD.getTypeAllocSize(DestLoc->Ptr->getType())) {
- Value *Dest = BitCastToType(DestLoc->Ptr, Call->getType()->getPointerTo());
- LLVM_EXTRACT_MULTIPLE_RETURN_VALUE(Call,Dest,DestLoc->Volatile,Builder);
- } else {
- // The call will return an aggregate value in registers, but
- // those registers are bigger than DestLoc. Allocate a
- // temporary to match the registers, store the registers there,
- // cast the temporary into the correct (smaller) type, and using
- // the correct type, copy the value into DestLoc. Assume the
- // optimizer will delete the temporary and clean this up.
- AllocaInst *biggerTmp = CreateTemporary(Call->getType());
- LLVM_EXTRACT_MULTIPLE_RETURN_VALUE(Call,biggerTmp,/*Volatile=*/false,
- Builder);
- EmitAggregateCopy(*DestLoc,
- MemRef(BitCastToType(biggerTmp,Call->getType()->
- getPointerTo()),
- DestLoc->getAlignment(),
- DestLoc->Volatile),
- TREE_TYPE(exp));
- }
+ Value *Dest = BitCastToType(DestLoc->Ptr, Call->getType()->getPointerTo());
+ LLVM_EXTRACT_MULTIPLE_RETURN_VALUE(Call,Dest,DestLoc->Volatile,Builder);
return 0;
}
More information about the llvm-branch-commits
mailing list