[llvm-commits] [llvm-gcc-4.2] r118373 - in /llvm-gcc-4.2/trunk/gcc/config/arm: arm.c arm.h

Anton Korobeynikov asl at math.spbu.ru
Sun Nov 7 01:11:35 PST 2010


Author: asl
Date: Sun Nov  7 03:11:35 2010
New Revision: 118373

URL: http://llvm.org/viewvc/llvm-project?rev=118373&view=rev
Log:
Revert r118233:
1. It breaks the buildbot.
2. It makes the logic of arch selection does not match what gcc does.

Modified:
    llvm-gcc-4.2/trunk/gcc/config/arm/arm.c
    llvm-gcc-4.2/trunk/gcc/config/arm/arm.h

Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.c?rev=118373&r1=118372&r2=118373&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/arm.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.c Sun Nov  7 03:11:35 2010
@@ -551,9 +551,6 @@
 /* The processor for which instructions should be scheduled.  */
 enum processor_type arm_tune = arm_none;
 
-/* LLVM LOCAL global arch value */
-enum processor_type target_arch_cpu = arm_none;
-
 /* APPLE LOCAL begin v7 support. Merge from mainline */
 /* The default processor used if not overriden by commandline.  */
 static enum processor_type arm_default_cpu = arm_none;
@@ -1292,13 +1289,12 @@
   unsigned i;
 /* APPLE LOCAL v7 support. Merge from Codesourcery */
   int len;
-  /* LLVM LOCAL global arch value */
-  /* Moved target_arch_cpu to arm.h */
+  enum processor_type target_arch_cpu = arm_none;
 
   /* Set up the flags based on the cpu/architecture selected by the user.  */
   for (i = ARRAY_SIZE (arm_select); i--;)
     {
-      struct arm_cpu_select * ptr = &arm_select[i];
+      struct arm_cpu_select * ptr = arm_select + i;
 
       if (ptr->string != NULL && ptr->string[0] != '\0')
         {

Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.h?rev=118373&r1=118372&r2=118373&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/arm.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.h Sun Nov  7 03:11:35 2010
@@ -149,9 +149,6 @@
 /* The processor for which instructions should be scheduled.  */
 extern enum processor_type arm_tune;
 
-/* LLVM LOCAL global arch value */
-extern enum processor_type target_arch_cpu;
-
 typedef enum arm_cond_code
 {
   ARM_EQ = 0, ARM_NE, ARM_CS, ARM_CC, ARM_MI, ARM_PL, ARM_VS, ARM_VC,
@@ -3459,7 +3456,7 @@
 /* Turn -march=xx into a CPU type.
  */
 #define LLVM_SET_SUBTARGET_FEATURES(F) \
-  { switch (target_arch_cpu) { \
+  { switch (arm_tune) { \
     case arm8:          F.setCPU("arm8"); break;\
     case arm810:        F.setCPU("arm810"); break;\
     case strongarm:     F.setCPU("strongarm"); break;\





More information about the llvm-commits mailing list