2014-12-04 Yvan Roux <yvan.roux@linaro.org>
authoryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Dec 2014 15:58:59 +0000 (15:58 +0000)
committeryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Dec 2014 15:58:59 +0000 (15:58 +0000)
Backport from trunk r216524.
2014-10-21  Andrew Pinski  <apinski@cavium.com>

* doc/invoke.texi (AARCH64/mtune): Document thunderx as an
available option also.
* config/aarch64/aarch64-cost-tables.h: New file.
* config/aarch64/aarch64-cores.def (thunderx): New core.
* config/aarch64/aarch64-tune.md: Regenerate.
* config/aarch64/aarch64.c: Include aarch64-cost-tables.h instead
of config/arm/aarch-cost-tables.h.
(thunderx_regmove_cost): New variable.
(thunderx_tunings): New variable.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@218379 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog.linaro
gcc/config/aarch64/aarch64-cores.def
gcc/config/aarch64/aarch64-tune.md
gcc/config/aarch64/aarch64.c
gcc/doc/invoke.texi

index f5440eb..bcc8632 100644 (file)
@@ -1,5 +1,20 @@
 2014-12-04  Yvan Roux  <yvan.roux@linaro.org>
 
+       Backport from trunk r216524.
+       2014-10-21  Andrew Pinski  <apinski@cavium.com>
+
+       * doc/invoke.texi (AARCH64/mtune): Document thunderx as an
+       available option also.
+       * config/aarch64/aarch64-cost-tables.h: New file.
+       * config/aarch64/aarch64-cores.def (thunderx): New core.
+       * config/aarch64/aarch64-tune.md: Regenerate.
+       * config/aarch64/aarch64.c: Include aarch64-cost-tables.h instead
+       of config/arm/aarch-cost-tables.h.
+       (thunderx_regmove_cost): New variable.
+       (thunderx_tunings): New variable.
+
+2014-12-04  Yvan Roux  <yvan.roux@linaro.org>
+
        Backport from trunk r216336.
        2014-10-16  Richard Earnshaw  <rearnsha@arm.com>
 
index 9319249..b3318c3 100644 (file)
@@ -36,6 +36,7 @@
 
 AARCH64_CORE("cortex-a53",  cortexa53, cortexa53, 8,  AARCH64_FL_FPSIMD | AARCH64_FL_CRC | AARCH64_FL_CRYPTO, cortexa53)
 AARCH64_CORE("cortex-a57",  cortexa15, cortexa15, 8,  AARCH64_FL_FPSIMD | AARCH64_FL_CRC | AARCH64_FL_CRYPTO, cortexa57)
+AARCH64_CORE("thunderx",    thunderx,  cortexa53, 8,  AARCH64_FL_FPSIMD | AARCH64_FL_CRC | AARCH64_FL_CRYPTO, thunderx)
 
 /* V8 big.LITTLE implementations.  */
 
index b7e40e0..c717ea8 100644 (file)
@@ -1,5 +1,5 @@
 ;; -*- buffer-read-only: t -*-
 ;; Generated automatically by gentune.sh from aarch64-cores.def
 (define_attr "tune"
-       "cortexa53,cortexa15,cortexa57cortexa53"
+       "cortexa53,cortexa15,thunderx,cortexa57cortexa53"
        (const (symbol_ref "((enum attr_tune) aarch64_tune)")))
index 0ead2b5..292ff6a 100644 (file)
@@ -62,7 +62,7 @@
 #include "dwarf2.h"
 #include "cfgloop.h"
 #include "tree-vectorizer.h"
-#include "config/arm/aarch-cost-tables.h"
+#include "aarch64-cost-tables.h"
 #include "dumpfile.h"
 
 /* Defined for convenience.  */
@@ -238,6 +238,14 @@ static const struct cpu_regmove_cost cortexa53_regmove_cost =
   NAMED_PARAM (FP2FP, 2)
 };
 
+static const struct cpu_regmove_cost thunderx_regmove_cost =
+{
+  NAMED_PARAM (GP2GP, 2),
+  NAMED_PARAM (GP2FP, 2),
+  NAMED_PARAM (FP2GP, 6),
+  NAMED_PARAM (FP2FP, 4)
+};
+
 /* Generic costs for vector insn classes.  */
 #if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
 __extension__
@@ -311,6 +319,16 @@ static const struct tune_params cortexa57_tunings =
   NAMED_PARAM (issue_rate, 3)
 };
 
+static const struct tune_params thunderx_tunings =
+{
+  &thunderx_extra_costs,
+  &generic_addrcost_table,
+  &thunderx_regmove_cost,
+  &generic_vector_cost,
+  NAMED_PARAM (memmov_cost, 6),
+  NAMED_PARAM (issue_rate, 2)
+};
+
 /* A processor implementing AArch64.  */
 struct processor
 {
index ee7a643..1d414e7 100644 (file)
@@ -11450,7 +11450,7 @@ architecture.
 @opindex mtune
 Specify the name of the target processor for which GCC should tune the
 performance of the code.  Permissible values for this option are:
-@samp{generic}, @samp{cortex-a53}, @samp{cortex-a57}.
+@samp{generic}, @samp{cortex-a53}, @samp{cortex-a57}, @samp{thunderx}.
 
 Additionally, this option can specify that GCC should tune the performance
 of the code for a big.LITTLE system.  The only permissible value is