From patchwork Fri Dec 30 03:43:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 709639 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tqXQK0KPbz9sQw for ; Fri, 30 Dec 2016 14:44:05 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="BZty8919"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=ftkIuAJJJXrbOavbx7Es3JUo86PIONWs6CWKrGOeJ56VC5 COsZmJi36sVC/GrJ+Kj52kQHJEOHoMU1UgTP91xgkxQB2riw76CrrTdxnItJ01/0 hl3Dg6O9XHxHtvp2TQiRekqGBGdLcnxE4cbG+f8CDpqHHBAt5U18aV9OwiNa8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=LoPI4Ayxi8HFfzHrFwxBlrLF3nw=; b=BZty8919OcZ7SBhtJpgo qsv1s05CKVvVqdefz4RVt6L5XIR+Q+NYAGZH7+9KmVuHemdHHsfbIvWTPsB4Y1Q2 qv+mirshsBThvFCxMglXvDDCTOPVSu9wP/eyi5NMERYDIWxRFnSwTH9bsxq0g7jW //C/Lc65P3RkoyiQt0HjInU= Received: (qmail 42173 invoked by alias); 30 Dec 2016 03:43:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 38905 invoked by uid 89); 30 Dec 2016 03:43:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=posting, auditing, AARCH64 X-HELO: mail-yw0-f177.google.com Received: from mail-yw0-f177.google.com (HELO mail-yw0-f177.google.com) (209.85.161.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Dec 2016 03:43:19 +0000 Received: by mail-yw0-f177.google.com with SMTP id t125so218870403ywc.1 for ; Thu, 29 Dec 2016 19:43:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kmORF+TvrVmBCr0CVG94nizEP0htMNcFIpbvBn+yHJA=; b=ahh3mUoHMbqyVflrVABxQv6r0OJANslo7ZSAlzRiaGSbWOg4xAHksrf2lHlWk0TDdN pDlAB2WI/uX0JD/TGdx/yIkLTiYCqu1L7h0RuUA+xXYIz0Y2++6lPgVq9GWGCYKEN51j k3kWKvEGHJK7YgsM75MHW1Nrqy0k5YYBNOIEqrRS7hGeP7uDzJB5nKgFwa2YPRFiHKFU N2smVJzttNMkPRmx88udnNbIqhc/slUnwaTi7PPp6zPhSPKBHBWJnhFgLThLpgzksXOs Zs7Y7bzuA+knsAZhn8U99rYR7xe/B33D09zaWoeZ9KQ8rFNP6qpoYDMS5XGcdx/WZXj+ hE1w== X-Gm-Message-State: AIkVDXIj/tukU50dSrlCQgb3gWmxlanFCJFu7KstnsRdJ0fXXwjFJOlj+zLG3eqP36fmNdCo0HMGsVzaY5PlIQ== X-Received: by 10.129.55.13 with SMTP id e13mr41409146ywa.344.1483069397908; Thu, 29 Dec 2016 19:43:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.42.65 with HTTP; Thu, 29 Dec 2016 19:43:17 -0800 (PST) From: Andrew Pinski Date: Thu, 29 Dec 2016 19:43:17 -0800 Message-ID: Subject: [PATCH/AARCH64] Add -mcpu=thunderx2t99 support To: GCC Patches X-IsSubscribed: yes Hi, This patch adds -mcpu=thunderx2t99. Cavium has acquired the Vulcan IP from Broadcom. I am keeping the old -mcpu=vulcan as backwards compatible but renaming all of the structures to be based on the new name of the chip. In the next few weeks, I am auditing the current tuning and will be posting some changes too. OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions. Also tested -mcpu=native on a ThunderX2 CN99xx machine. Thanks, Andrew ChangeLog: * config/aarch64/aarch64-cores.def: Add thunderx2t99. Change vulcan to reference thunderx2t99 for the tuning structure * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs): Rename to ... (thunderx2t99_extra_costs): This. * config/aarch64/aarch64-tune.md: Regenerate. * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ... (vulcan_addrcost_table): This. (vulcan_regmove_cost): Rename to ... (thunderx2t99_regmove_cost): This. (vulcan_vector_cost): Rename to ... (thunderx2t99_vector_cost): this. (vulcan_branch_cost): Rename to ... (thunderx2t99_branch_cost): This. (vulcan_tunings): Rename to ... (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 . * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99. Index: gcc/config/aarch64/aarch64-cores.def =================================================================== --- gcc/config/aarch64/aarch64-cores.def (revision 243968) +++ gcc/config/aarch64/aarch64-cores.def (working copy) @@ -74,7 +74,8 @@ AARCH64_CORE("xgene1", xgene1, x /* V8.1 Architecture Processors. */ /* Broadcom ('B') cores. */ -AARCH64_CORE("vulcan", vulcan, cortexa57, 8_1A, AARCH64_FL_FOR_ARCH8_1 | AARCH64_FL_CRYPTO, vulcan, 0x42, 0x516, -1) +AARCH64_CORE("thunderx2t99", thunderx2t99, cortexa57, 8_1A, AARCH64_FL_FOR_ARCH8_1 | AARCH64_FL_CRYPTO, thunderx2t99, 0x42, 0x516, -1) +AARCH64_CORE("vulcan", vulcan, cortexa57, 8_1A, AARCH64_FL_FOR_ARCH8_1 | AARCH64_FL_CRYPTO, thunderx2t99, 0x42, 0x516, -1) /* V8 big.LITTLE implementations. */ Index: gcc/config/aarch64/aarch64-cost-tables.h =================================================================== --- gcc/config/aarch64/aarch64-cost-tables.h (revision 243968) +++ gcc/config/aarch64/aarch64-cost-tables.h (working copy) @@ -127,7 +127,7 @@ const struct cpu_cost_table thunderx_ext } }; -const struct cpu_cost_table vulcan_extra_costs = +const struct cpu_cost_table thunderx2t99_extra_costs = { /* ALU */ { Index: gcc/config/aarch64/aarch64-tune.md =================================================================== --- gcc/config/aarch64/aarch64-tune.md (revision 243968) +++ gcc/config/aarch64/aarch64-tune.md (working copy) @@ -1,5 +1,5 @@ ;; -*- buffer-read-only: t -*- ;; Generated automatically by gentune.sh from aarch64-cores.def (define_attr "tune" - "cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,exynosm1,falkor,qdf24xx,thunderx,thunderxt88p1,thunderxt88,thunderxt81,thunderxt83,xgene1,vulcan,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53" + "cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,exynosm1,falkor,qdf24xx,thunderx,thunderxt88p1,thunderxt88,thunderxt81,thunderxt83,xgene1,thunderx2t99,vulcan,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53" (const (symbol_ref "((enum attr_tune) aarch64_tune)"))) Index: gcc/config/aarch64/aarch64.c =================================================================== --- gcc/config/aarch64/aarch64.c (revision 243968) +++ gcc/config/aarch64/aarch64.c (working copy) @@ -268,7 +268,7 @@ static const struct cpu_addrcost_table q 0 /* imm_offset */ }; -static const struct cpu_addrcost_table vulcan_addrcost_table = +static const struct cpu_addrcost_table thunderx2t99_addrcost_table = { { 0, /* hi */ @@ -351,7 +351,7 @@ static const struct cpu_regmove_cost qdf 4 /* FP2FP */ }; -static const struct cpu_regmove_cost vulcan_regmove_cost = +static const struct cpu_regmove_cost thunderx2t99_regmove_cost = { 1, /* GP2GP */ /* Avoid the use of int<->fp moves for spilling. */ @@ -450,7 +450,7 @@ static const struct cpu_vector_cost xgen }; /* Costs for vector insn classes for Vulcan. */ -static const struct cpu_vector_cost vulcan_vector_cost = +static const struct cpu_vector_cost thunderx2t99_vector_cost = { 6, /* scalar_stmt_cost */ 4, /* scalar_load_cost */ @@ -482,7 +482,7 @@ static const struct cpu_branch_cost cort }; /* Branch costs for Vulcan. */ -static const struct cpu_branch_cost vulcan_branch_cost = +static const struct cpu_branch_cost thunderx2t99_branch_cost = { 1, /* Predictable. */ 3 /* Unpredictable. */ @@ -768,13 +768,13 @@ static const struct tune_params qdf24xx_ (AARCH64_EXTRA_TUNE_NONE) /* tune_flags. */ }; -static const struct tune_params vulcan_tunings = +static const struct tune_params thunderx2t99_tunings = { - &vulcan_extra_costs, - &vulcan_addrcost_table, - &vulcan_regmove_cost, - &vulcan_vector_cost, - &vulcan_branch_cost, + &thunderx2t99_extra_costs, + &thunderx2t99_addrcost_table, + &thunderx2t99_regmove_cost, + &thunderx2t99_vector_cost, + &thunderx2t99_branch_cost, &generic_approx_modes, 4, /* memmov_cost. */ 4, /* issue_rate. */ Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 243968) +++ gcc/doc/invoke.texi (working copy) @@ -13973,8 +13973,9 @@ performance of the code. Permissible va @samp{cortex-a72}, @samp{cortex-a73}, @samp{exynos-m1}, @samp{falkor}, @samp{qdf24xx}, @samp{xgene1}, @samp{vulcan}, @samp{thunderx}, @samp{thunderxt88}, @samp{thunderxt88p1}, @samp{thunderxt81}, -@samp{thunderxt83}, @samp{cortex-a57.cortex-a53}, @samp{cortex-a72.cortex-a53}, -@samp{cortex-a73.cortex-a35}, @samp{cortex-a73.cortex-a53}, @samp{native}. +@samp{thunderxt83}, @samp{thunderx2t99}, @samp{cortex-a57.cortex-a53}, +@samp{cortex-a72.cortex-a53}, @samp{cortex-a73.cortex-a35}, +@samp{cortex-a73.cortex-a53}, @samp{native}. The values @samp{cortex-a57.cortex-a53}, @samp{cortex-a72.cortex-a53}, @samp{cortex-a73.cortex-a35}, @samp{cortex-a73.cortex-a53}