From patchwork Fri Nov 13 10:13:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 56495 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp944765lbb; Fri, 13 Nov 2015 02:14:02 -0800 (PST) X-Received: by 10.67.5.193 with SMTP id co1mr30025604pad.134.1447409641895; Fri, 13 Nov 2015 02:14:01 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id q6si22198264pap.178.2015.11.13.02.14.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Nov 2015 02:14:01 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-413923-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-return-413923-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-413923-patch=linaro.org@gcc.gnu.org; dkim=pass header.i=@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=vAAoETkYnIp5Jt3m65wwRpJHeUb2NvWNqUl6tlSLH97/0z3j/H cm0baDBKENsM3pvTgydBtumrZPJkGq9RWkNwyBfCB6LgMCRSiuKz182WsqM0mM1q BLWHRUVauTU0fmS6vf29Uydv5wqnRdqO3UwRg+QVUulScSUCOYVOQ0Y3Q= 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:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=qCet2WWJfSMGlJd/193xlrmxLfg=; b=AoXtTpyX+qJ9JOdTNbiO RaLi1JAwgfyIGhCcwj+VHEFxbjk4n+9cKsO3kKbAHRLRMSZn3x1zFjaGkP83hDwz r1TOUxmEqKY8LK8PmB4NGkQShq5L6eZ+pNdhqLqMlLtpQB5Wv9lnnKjIQ6h00EmA IPY4+XG4I/Z0TzlXsTKj/Yo= Received: (qmail 10201 invoked by alias); 13 Nov 2015 10:13:37 -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 10091 invoked by uid 89); 13 Nov 2015 10:13:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Nov 2015 10:13:35 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-12-KPurzxY0Sky98YnRZt-q8w-1; Fri, 13 Nov 2015 10:13:29 +0000 Received: from e107456-lin.cambridge.arm.com ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 13 Nov 2015 10:13:29 +0000 From: James Greenhalgh To: gcc-patches@gcc.gnu.org Cc: marcus.shawcroft@arm.com, richard.earnshaw@arm.com Subject: [AArch64] Cortex-A57 Choose some new branch costs. Date: Fri, 13 Nov 2015 10:13:25 +0000 Message-Id: <1447409605-35653-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-MC-Unique: KPurzxY0Sky98YnRZt-q8w-1 X-IsSubscribed: yes Hi, With all the work that has recently gone in to ifcvt, I thought I'd revisit the branch cost settings for Cortex-A57. After a run of experiments [1], I found {1, 3} to be the sweet spot, giving a small set of performance improvements across some popular benchmarks. I'd therefore like to propose changing the branch cost to those numbers. Patch bootstrapped tuning for Cortex-A57 with no issues. I'll revisit the same for Cortex-A53. OK? Thanks, James [1]: {2, 2}, {2, 3}, {2, 4}, {1, 2}, {1, 3}, {1, 4}, {3, 3}, {3, 4}, {4, 4}, {4, 5}, {5, 5}, {5, 6} --- 2015-11-12 James Greenhalgh * config/aarch64/aarch64.c (cortexa57_branch_costs): New. (cortexa57_tunings): Use it. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 5ec7f08..96df9ed 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -338,6 +338,13 @@ static const struct cpu_branch_cost generic_branch_cost = 2 /* Unpredictable. */ }; +/* Branch costs for Cortex-A57. */ +static const struct cpu_branch_cost cortexa57_branch_cost = +{ + 1, /* Predictable. */ + 3 /* Unpredictable. */ +}; + static const struct tune_params generic_tunings = { &cortexa57_extra_costs, @@ -393,7 +400,7 @@ static const struct tune_params cortexa57_tunings = &cortexa57_addrcost_table, &cortexa57_regmove_cost, &cortexa57_vector_cost, - &generic_branch_cost, + &cortexa57_branch_cost, 4, /* memmov_cost */ 3, /* issue_rate */ (AARCH64_FUSE_MOV_MOVK | AARCH64_FUSE_ADRP_ADD