[llvm-commits] [llvm-gcc-4.2] r85542 - /llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm.cpp

Bob Wilson bob.wilson at apple.com
Thu Oct 29 16:53:28 PDT 2009


Author: bwilson
Date: Thu Oct 29 18:53:27 2009
New Revision: 85542

URL: http://llvm.org/viewvc/llvm-project?rev=85542&view=rev
Log:
Remove trailing whitespace.

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=85542&r1=85541&r2=85542&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 18:53:27 2009
@@ -1,5 +1,5 @@
 /* LLVM LOCAL begin (ENTIRE FILE!)  */
-/* High-level LLVM backend interface 
+/* High-level LLVM backend interface
 Copyright (C) 2008, 2009 Apple Inc.
 
 This file is part of GCC.
@@ -2244,14 +2244,14 @@
 // aggregate."
 enum arm_fdts {
   ARM_FDT_INVALID,
-  
+
   ARM_FDT_HALF_FLOAT,
   ARM_FDT_FLOAT,
   ARM_FDT_DOUBLE,
-  
+
   ARM_FDT_VECTOR_64,
   ARM_FDT_VECTOR_128,
-  
+
   ARM_FDT_MAX
 };
 
@@ -2264,7 +2264,7 @@
   bool result = false;
   HOST_WIDE_INT bytes =
     (mode == BLKmode) ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode);
-  
+
   if (type && AGGREGATE_TYPE_P (type))
   {
     int i;
@@ -2314,7 +2314,7 @@
         // Arrays are handled as small records.
         {
           int array_fdt_counts[ARM_FDT_MAX] = { 0 };
-          
+
           result = vfp_arg_homogeneous_aggregate_p(TYPE_MODE(TREE_TYPE(type)),
                                                    TREE_TYPE(type),
                                                    array_fdt_counts);
@@ -2322,12 +2322,12 @@
           cnt = bytes / int_size_in_bytes(TREE_TYPE(type));
           for (i = 0; i < ARM_FDT_MAX; ++i)
             fdt_counts[i] += array_fdt_counts[i] * cnt;
-            
+
           if (!result)
             return false;
         }
       break;
-      
+
       case UNION_TYPE:
       case QUAL_UNION_TYPE:
         {
@@ -2350,28 +2350,28 @@
                           union_field_fdt_counts);
               if (!result)
                 return false;
-            
+
               // track largest union field
               for (i = 0; i < ARM_FDT_MAX; ++i) {
                 if (union_field_fdt_counts[i] > 4)  // bail early if we can
                   return false;
-                
+
                 union_fdt_counts[i] = MAX(union_fdt_counts[i],
                                           union_field_fdt_counts[i]);
                 union_field_fdt_counts[i] = 0;  // clear it out for next iter
               }
             }
           }
-          
+
           // check for only one type across all union fields
           cnt = 0;
           for (i = 0; i < ARM_FDT_MAX; ++i) {
             if (union_fdt_counts[i])
               ++cnt;
-          
+
             if (cnt > 1)
               return false;
-              
+
             fdt_counts[i] += union_fdt_counts[i];
           }
         }
@@ -2380,16 +2380,16 @@
       default:
       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.
     cnt = 0;
     for (i = 0; i < ARM_FDT_MAX; ++i) {
       if (fdt_counts[i])
         ++cnt;
-    
+
       if (cnt > 1)
         return false;
     }
@@ -2410,30 +2410,30 @@
     else if (fdt_counts[ARM_FDT_VECTOR_128] >= 1 &&
              fdt_counts[ARM_FDT_VECTOR_128] <= 4)
       result = true;
-    
+
     return result;
   }
-  
+
   if (type)
   {
     int idx = 0;
     int cnt = 0;
-    
+
     switch (TREE_CODE(type))
     {
     case REAL_TYPE:
-      idx = (TYPE_PRECISION(type) == 32) ? 
+      idx = (TYPE_PRECISION(type) == 32) ?
               ARM_FDT_FLOAT :
               ((TYPE_PRECISION(type) == 64) ?
                 ARM_FDT_DOUBLE :
                 ARM_FDT_INVALID);
       cnt = 1;
       break;
-      
+
     case COMPLEX_TYPE:
       {
         tree subtype = TREE_TYPE(type);
-        idx = (TYPE_PRECISION(subtype) == 32) ? 
+        idx = (TYPE_PRECISION(subtype) == 32) ?
                 ARM_FDT_FLOAT :
                 ((TYPE_PRECISION(subtype) == 64) ?
                   ARM_FDT_DOUBLE :
@@ -2441,7 +2441,7 @@
         cnt = 2;
       }
       break;
-      
+
     case VECTOR_TYPE:
       idx = (bytes == 8) ?
               ARM_FDT_VECTOR_64 :
@@ -2450,7 +2450,7 @@
                 ARM_FDT_INVALID;
       cnt = 1;
       break;
-      
+
     case INTEGER_TYPE:
     case POINTER_TYPE:
     case ENUMERAL_TYPE:
@@ -2461,13 +2461,13 @@
     default:
       return false;     // All of these disqualify.
     }
-    
+
     fdt_counts[idx] += cnt;
     return true;
   }
   else
     assert(0 && "what type was this?");
-  
+
   return false;
 }
 
@@ -2493,7 +2493,7 @@
       }
     } else if (const ArrayType *ATy = dyn_cast<ArrayType>(STy)) {
       const Type *ETy = ATy->getElementType();
-      
+
       for (uint64_t i = ATy->getNumElements(); i > 0; --i)
         Elts.push_back(ETy);
     } else if (STy->getNumContainedTypes())
@@ -2518,9 +2518,9 @@
   // Walk Ty and push LLVM types corresponding to register types onto
   // Elts.
   push_elts(Ty, Elts);
-  
+
   return true;
-}  
+}
 
 static bool alloc_next_spr(bool *SPRs)
 {
@@ -2619,17 +2619,17 @@
 
   if (!count_num_registers_uses(Elts, SPRs))
     return true;
-    
+
   return false;                            // it all fit in registers!
 }
 
-// Return LLVM Type if TYPE can be returned as an aggregate, 
+// Return LLVM Type if TYPE can be returned as an aggregate,
 // otherwise return NULL.
 const Type *llvm_arm_aggr_type_for_struct_return(tree TreeType,
                                                  CallingConv::ID &CC) {
   if (!llvm_arm_should_pass_or_return_aggregate_in_regs(TreeType, CC))
     return NULL;
-    
+
   // Walk Ty and push LLVM types corresponding to register types onto
   // Elts.
   std::vector<const Type*> Elts;
@@ -2639,17 +2639,17 @@
   return StructType::get(Context, Elts, false);
 }
 
-// llvm_arm_extract_mrv_array_element - Helper function that helps extract 
+// llvm_arm_extract_mrv_array_element - Helper function that helps extract
 // an array element from multiple return value.
 //
 // Here, SRC is returning multiple values. DEST's DESTFIELDNO field is an array.
-// Extract SRCFIELDNO's ELEMENO value and store it in DEST's FIELDNO field's 
+// Extract SRCFIELDNO's ELEMENO value and store it in DEST's FIELDNO field's
 // ELEMENTNO.
 //
 static void llvm_arm_extract_mrv_array_element(Value *Src, Value *Dest,
-                                               unsigned SrcFieldNo, 
+                                               unsigned SrcFieldNo,
                                                unsigned SrcElemNo,
-                                               unsigned DestFieldNo, 
+                                               unsigned DestFieldNo,
                                                unsigned DestElemNo,
                                                LLVMBuilder &Builder,
                                                bool isVolatile) {
@@ -2675,7 +2675,6 @@
 void llvm_arm_extract_multiple_return_value(Value *Src, Value *Dest,
                                             bool isVolatile,
                                             LLVMBuilder &Builder) {
-  
   const StructType *STy = cast<StructType>(Src->getType());
   unsigned NumElements = STy->getNumElements();
 
@@ -2696,7 +2695,7 @@
       Builder.CreateStore(EVI, GEP, isVolatile);
       ++DNO; ++SNO;
       continue;
-    } 
+    }
 
     // Access array elements individually. Note, Src and Dest type may
     // not match. For example { <2 x float>, float } and { float[3]; }
@@ -2706,20 +2705,20 @@
     while (DElemNo < ArraySize) {
       unsigned i = 0;
       unsigned Size = 1;
-      
-      if (const VectorType *SElemTy = 
+
+      if (const VectorType *SElemTy =
           dyn_cast<VectorType>(STy->getElementType(SNO))) {
         Size = SElemTy->getNumElements();
       }
       while (i < Size) {
-        llvm_arm_extract_mrv_array_element(Src, Dest, SNO, i++, 
-                                           DNO, DElemNo++, 
+        llvm_arm_extract_mrv_array_element(Src, Dest, SNO, i++,
+                                           DNO, DElemNo++,
                                            Builder, isVolatile);
       }
       // Consumed this src field. Try next one.
       ++SNO;
     }
-    // Finished building current dest field. 
+    // Finished building current dest field.
     ++DNO;
   }
 }





More information about the llvm-commits mailing list