[llvm-branch-commits] [cfe-branch] r310728 - Merging r310704:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 11 09:32:49 PDT 2017


Author: hans
Date: Fri Aug 11 09:32:49 2017
New Revision: 310728

URL: http://llvm.org/viewvc/llvm-project?rev=310728&view=rev
Log:
Merging r310704:
------------------------------------------------------------------------
r310704 | smaksimovic | 2017-08-11 04:39:07 -0700 (Fri, 11 Aug 2017) | 8 lines

Revert r302670 for the upcoming 5.0.0 release

This is causing failures when compiling clang with -O3
as one of the structures used by clang is passed by
value and uses the fastcc calling convention.

Faliures manifest for stage2 mips build.

------------------------------------------------------------------------

Removed:
    cfe/branches/release_50/test/CodeGen/mips-aggregate-arg.c
Modified:
    cfe/branches/release_50/   (props changed)
    cfe/branches/release_50/lib/CodeGen/TargetInfo.cpp

Propchange: cfe/branches/release_50/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 11 09:32:49 2017
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310158,310191,310359,310691-310692,310694,310700
+/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310158,310191,310359,310691-310692,310694,310700,310704
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_50/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/lib/CodeGen/TargetInfo.cpp?rev=310728&r1=310727&r2=310728&view=diff
==============================================================================
--- cfe/branches/release_50/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/branches/release_50/lib/CodeGen/TargetInfo.cpp Fri Aug 11 09:32:49 2017
@@ -6751,14 +6751,6 @@ MipsABIInfo::classifyArgumentType(QualTy
       return getNaturalAlignIndirect(Ty, RAA == CGCXXABI::RAA_DirectInMemory);
     }
 
-    // Use indirect if the aggregate cannot fit into registers for
-    // passing arguments according to the ABI
-    unsigned Threshold = IsO32 ? 16 : 64;
-
-    if(getContext().getTypeSizeInChars(Ty) > CharUnits::fromQuantity(Threshold))
-      return ABIArgInfo::getIndirect(CharUnits::fromQuantity(Align), true,
-                                     getContext().getTypeAlign(Ty) / 8 > Align);
-
     // If we have reached here, aggregates are passed directly by coercing to
     // another structure type. Padding is inserted if the offset of the
     // aggregate is unaligned.

Removed: cfe/branches/release_50/test/CodeGen/mips-aggregate-arg.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/test/CodeGen/mips-aggregate-arg.c?rev=310727&view=auto
==============================================================================
--- cfe/branches/release_50/test/CodeGen/mips-aggregate-arg.c (original)
+++ cfe/branches/release_50/test/CodeGen/mips-aggregate-arg.c (removed)
@@ -1,38 +0,0 @@
-// RUN: %clang_cc1 -triple mipsel-unknown-linux-gnu -S -emit-llvm -o - %s | FileCheck -check-prefix=O32 %s
-// RUN: %clang_cc1 -triple mips64el-unknown-linux-gnu -S -emit-llvm -o - %s  -target-abi n32 | FileCheck -check-prefix=N32-N64 %s
-// RUN: %clang_cc1 -triple mips64el-unknown-linux-gnu -S -emit-llvm -o - %s  -target-abi n64 | FileCheck -check-prefix=N32-N64 %s
-
-struct t1 {
-  char t1[10];
-};
-
-struct t2 {
-  char t2[20];
-};
-
-struct t3 {
-  char t3[65];
-};
-
-extern struct t1 g1;
-extern struct t2 g2;
-extern struct t3 g3;
-extern void f1(struct t1);
-extern void f2(struct t2);
-extern void f3(struct t3);
-
-void f() {
-
-// O32:  call void @f1(i32 inreg %{{[0-9]+}}, i32 inreg %{{[0-9]+}}, i16 inreg %{{[0-9]+}})
-// O32:  call void @f2(%struct.t2* byval align 4 %{{.*}})
-// O32:  call void @f3(%struct.t3* byval align 4 %{{.*}})
-
-// N32-N64:  call void @f1(i64 inreg %{{[0-9]+}}, i16 inreg %{{[0-9]+}})
-// N32-N64:  call void @f2(i64 inreg %{{[0-9]+}}, i64 inreg %{{[0-9]+}}, i32 inreg %{{[0-9]+}})
-// N32-N64:  call void @f3(%struct.t3* byval align 8 %{{.*}})
-
-  f1(g1);
-  f2(g2);
-  f3(g3);
-}
-




More information about the llvm-branch-commits mailing list