]> granicus.if.org Git - clang/commitdiff
x86_64 ABI: Actually, we can always pass things we want to pass in
authorDaniel Dunbar <daniel@zuster.org>
Sun, 22 Feb 2009 08:17:51 +0000 (08:17 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 22 Feb 2009 08:17:51 +0000 (08:17 +0000)
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

lib/CodeGen/CGCall.cpp

index 45896314ecb23e960c0e8e3b7827dda52aa64197..db5085aaab81654bdf959db2c2c737c667d0b024 100644 (file)
@@ -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);
     }
   }
 }