From fb6d4ad7731cc38ac7323777b8218ecbf3cfee6d Mon Sep 17 00:00:00 2001 From: yroux Date: Thu, 4 Dec 2014 15:58:59 +0000 Subject: [PATCH] 2014-12-04 Yvan Roux Backport from trunk r216524. 2014-10-21 Andrew Pinski * 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 | 15 +++++++++++++++ gcc/config/aarch64/aarch64-cores.def | 1 + gcc/config/aarch64/aarch64-tune.md | 2 +- gcc/config/aarch64/aarch64.c | 20 +++++++++++++++++++- gcc/doc/invoke.texi | 2 +- 5 files changed, 37 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog.linaro b/gcc/ChangeLog.linaro index f5440eb..bcc8632 100644 --- a/gcc/ChangeLog.linaro +++ b/gcc/ChangeLog.linaro @@ -1,5 +1,20 @@ 2014-12-04 Yvan Roux + Backport from trunk r216524. + 2014-10-21 Andrew Pinski + + * 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 + Backport from trunk r216336. 2014-10-16 Richard Earnshaw diff --git a/gcc/config/aarch64/aarch64-cores.def b/gcc/config/aarch64/aarch64-cores.def index 9319249..b3318c3 100644 --- a/gcc/config/aarch64/aarch64-cores.def +++ b/gcc/config/aarch64/aarch64-cores.def @@ -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. */ diff --git a/gcc/config/aarch64/aarch64-tune.md b/gcc/config/aarch64/aarch64-tune.md index b7e40e0..c717ea8 100644 --- a/gcc/config/aarch64/aarch64-tune.md +++ b/gcc/config/aarch64/aarch64-tune.md @@ -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)"))) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 0ead2b5..292ff6a 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -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 { diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index ee7a643..1d414e7 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -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 -- 2.7.4