From: Daniel Dunbar Date: Sun, 22 Feb 2009 08:17:51 +0000 (+0000) Subject: x86_64 ABI: Actually, we can always pass things we want to pass in X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=245f5534a520c23e703fd239632273c551be50b3;p=clang x86_64 ABI: Actually, we can always pass things we want to pass in memory using Indirect; this was a holdover from when CGCall wasn't as robust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65278 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 45896314ec..db5085aaab 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -842,11 +842,7 @@ ABIArgInfo X86_64ABIInfo::classifyArgumentType(QualType Ty, ASTContext &Context, // COMPLEX_X87, it is passed in memory. case X87: case ComplexX87: - // Choose appropriate in memory type. - if (Ty->isVectorType() || CodeGenFunction::hasAggregateLLVMType(Ty)) - return ABIArgInfo::getIndirect(0); - else - return ABIArgInfo::getDirect(); + return ABIArgInfo::getIndirect(0); case SSEUp: case X87Up: @@ -922,11 +918,7 @@ void X86_64ABIInfo::computeInfo(CGFunctionInfo &FI, ASTContext &Context) const { freeIntRegs -= neededInt; freeSSERegs -= neededSSE; } else { - // Choose appropriate in memory type. - if (CodeGenFunction::hasAggregateLLVMType(it->type)) - it->info = ABIArgInfo::getIndirect(0); - else - it->info = ABIArgInfo::getDirect(); + it->info = ABIArgInfo::getIndirect(0); } } }