[llvm-commits] [llvm-gcc-4.2] r85543 - /llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm.cpp
Bob Wilson
bob.wilson at apple.com
Thu Oct 29 17:00:45 PDT 2009
Author: bwilson
Date: Thu Oct 29 19:00:45 2009
New Revision: 85543
URL: http://llvm.org/viewvc/llvm-project?rev=85543&view=rev
Log:
Check the FDT count when finding a non-zero count, instead of
waiting and checking each count separately.
Modified:
llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm.cpp
Modified: llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm.cpp?rev=85543&r1=85542&r2=85543&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm.cpp Thu Oct 29 19:00:45 2009
@@ -2381,37 +2381,22 @@
assert(0 && "What type is this?");
}
- // Walk through fdt_counts and decide if we're a homogeneous aggregate.
- result = false;
-
- // Make sure that only one FDT is used.
+ // Walk through fdt_counts. This is a homogeneous aggregate if
+ // only one FDT is used.
cnt = 0;
for (i = 0; i < ARM_FDT_MAX; ++i) {
- if (fdt_counts[i])
+ if (fdt_counts[i]) {
+ // Make sure that one FDT is 4 or less elements in size.
+ if (fdt_counts[i] > 4)
+ return false;
++cnt;
+ }
if (cnt > 1)
return false;
}
- // Make sure that one FDT is 4 or less elements in size.
- if (fdt_counts[ARM_FDT_HALF_FLOAT] >= 1 &&
- fdt_counts[ARM_FDT_HALF_FLOAT] <= 4)
- result = true;
- else if (fdt_counts[ARM_FDT_FLOAT] >= 1 &&
- fdt_counts[ARM_FDT_FLOAT] <= 4)
- result = true;
- else if (fdt_counts[ARM_FDT_DOUBLE] >= 1 &&
- fdt_counts[ARM_FDT_DOUBLE] <= 4)
- result = true;
- else if (fdt_counts[ARM_FDT_VECTOR_64] >= 1 &&
- fdt_counts[ARM_FDT_VECTOR_64] <= 4)
- result = true;
- else if (fdt_counts[ARM_FDT_VECTOR_128] >= 1 &&
- fdt_counts[ARM_FDT_VECTOR_128] <= 4)
- result = true;
-
- return result;
+ return true;
}
if (type)
More information about the llvm-commits
mailing list