From patchwork Fri May 27 16:59:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrill Tkachov X-Patchwork-Id: 627293 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 3rGXL55v1Rz9t3t for ; Sat, 28 May 2016 02:59:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Bn2Ut7Ct; 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 :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=XGg7mD1D2osh25Ce/g/bIG0/sEQ9RcwEYdn6CsexdC+ a5WfVNCyjZ0hu2/na8tL3GPbrWpEK0FSeV4VBLS9nKyGovy/7pleH6Q2TjXfjFmn mudUGwNa2dXYFrZBVdBP3F319bIApwZRrbqJqctMiisr0dk9T79yftaa0zZwWRno = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=ABTRHzHckLghlumAjmFB/VccCWc=; b=Bn2Ut7CtM6uSrW78w bkAbd+D+4IhDnIakXnUVWgTjFZ823tJ05anUz40UjtkMiA3f6HOseDASx1XV3pHf bP8gS6I6eryFvENtfmdMIya8tgZ+RPdW2QDnmHWXZWXaaZ3uG2/0v9/BqNEAPxlp iM40EKHLOpMn/eE2hFu5eSq/5k= Received: (qmail 90501 invoked by alias); 27 May 2016 16:59:17 -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 90484 invoked by uid 89); 27 May 2016 16:59:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 May 2016 16:59:06 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BFFDB34; Fri, 27 May 2016 09:59:30 -0700 (PDT) Received: from [10.2.206.43] (e100706-lin.cambridge.arm.com [10.2.206.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8AAA13F246; Fri, 27 May 2016 09:59:04 -0700 (PDT) Message-ID: <57487CD7.8080603@foss.arm.com> Date: Fri, 27 May 2016 17:59:03 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches CC: Marcus Shawcroft , Richard Earnshaw , James Greenhalgh Subject: [PATCH][AArch64] Use aarch64_fusion_enabled_p to check for insn fusion capabilities Hi all, This patch is a small cleanup that uses the newly introduced aarch64_fusion_enabled_p predicate to check for what fusion opportunities are enabled for the current target. Tested on aarch64-none-elf. Ok for trunk? Thanks, Kyrill 2016-05-27 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Use aarch64_fusion_enabled_p to check for fusion capabilities. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 49cd50b61cf4ba8074a44ae4029316a8af2f793b..8f850c653167d108f899ae9ec5d65938a288aa17 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -13070,8 +13070,7 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr) if (!aarch64_macro_fusion_p ()) return false; - if (simple_sets_p - && (aarch64_tune_params.fusible_ops & AARCH64_FUSE_MOV_MOVK)) + if (simple_sets_p && aarch64_fusion_enabled_p (AARCH64_FUSE_MOV_MOVK)) { /* We are trying to match: prev (mov) == (set (reg r0) (const_int imm16)) @@ -13095,8 +13094,7 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr) } } - if (simple_sets_p - && (aarch64_tune_params.fusible_ops & AARCH64_FUSE_ADRP_ADD)) + if (simple_sets_p && aarch64_fusion_enabled_p (AARCH64_FUSE_ADRP_ADD)) { /* We're trying to match: @@ -13121,8 +13119,7 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr) } } - if (simple_sets_p - && (aarch64_tune_params.fusible_ops & AARCH64_FUSE_MOVK_MOVK)) + if (simple_sets_p && aarch64_fusion_enabled_p (AARCH64_FUSE_MOVK_MOVK)) { /* We're trying to match: @@ -13150,8 +13147,7 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr) return true; } - if (simple_sets_p - && (aarch64_tune_params.fusible_ops & AARCH64_FUSE_ADRP_LDR)) + if (simple_sets_p && aarch64_fusion_enabled_p (AARCH64_FUSE_ADRP_LDR)) { /* We're trying to match: prev (adrp) == (set (reg r0) @@ -13182,11 +13178,11 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr) } } - if ((aarch64_tune_params.fusible_ops & AARCH64_FUSE_AES_AESMC) + if (aarch64_fusion_enabled_p (AARCH64_FUSE_AES_AESMC) && aarch_crypto_can_dual_issue (prev, curr)) return true; - if ((aarch64_tune_params.fusible_ops & AARCH64_FUSE_CMP_BRANCH) + if (aarch64_fusion_enabled_p (AARCH64_FUSE_CMP_BRANCH) && any_condjump_p (curr)) { enum attr_type prev_type = get_attr_type (prev);