[AArch64] Use selected cpu's tuning when no tuning parameter is specified
authorRenlin Li <renlin.li@arm.com>
Fri, 5 Dec 2014 15:54:57 +0000 (15:54 +0000)
committerRenlin Li <renlin@gcc.gnu.org>
Fri, 5 Dec 2014 15:54:57 +0000 (15:54 +0000)
gcc/

2014-12-05  Renlin Li  <renlin.li@arm.com>

* config/aarch64/aarch64.c (aarch64_parse_cpu): Don't define
selected_tune.
(aarch64_override_options): Use selected_cpu's tuning.

From-SVN: r218425

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index 06f775da2e34a83f7ddf25dcb56c14404af23638..a8f92da085298e2e32b06d434deebf33e8a8b121 100644 (file)
@@ -1,3 +1,9 @@
+2014-12-05  Renlin Li  <renlin.li@arm.com>
+
+       * config/aarch64/aarch64.c (aarch64_parse_cpu): Don't define
+       selected_tune.
+       (aarch64_override_options): Use selected_cpu's tuning.
+
 2014-12-05  David Edelsohn  <dje.gcc@gmail.com>
 
        * config/rs6000/xcoff.h (ASM_OUTPUT_ALIGNED_LOCAL): Append
index 9f7cccc22316a5ad6f320a35dd15baf6845c70b4..d3ef770a6cbd32059070fc2cdddaa7cce1532955 100644 (file)
@@ -6625,7 +6625,6 @@ aarch64_parse_cpu (void)
       if (strlen (cpu->name) == len && strncmp (cpu->name, str, len) == 0)
        {
          selected_cpu = cpu;
-         selected_tune = cpu;
          aarch64_isa_flags = selected_cpu->flags;
 
          if (ext != NULL)
@@ -6721,9 +6720,8 @@ aarch64_override_options (void)
 
   gcc_assert (selected_cpu);
 
-  /* The selected cpu may be an architecture, so lookup tuning by core ID.  */
   if (!selected_tune)
-    selected_tune = &all_cores[selected_cpu->core];
+    selected_tune = selected_cpu;
 
   aarch64_tune_flags = selected_tune->flags;
   aarch64_tune = selected_tune->core;