From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8024 invoked by alias); 3 Jun 2015 16:03:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 8015 invoked by uid 89); 3 Jun 2015 16:03:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 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; Wed, 03 Jun 2015 16:03:16 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-24.uk.mimecast.lan; Wed, 03 Jun 2015 17:03:04 +0100 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 3 Jun 2015 17:03:04 +0100 Message-ID: <556F2538.5080902@arm.com> Date: Wed, 03 Jun 2015 16:30:00 -0000 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] Always register fma_steering pass but gate it on the target option instead X-MC-Unique: Iy5xaX6DSkmUWqVT6CCYAw-1 Content-Type: multipart/mixed; boundary="------------010701010208000004000803" X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00339.txt.bz2 This is a multi-part message in MIME format. --------------010701010208000004000803 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-length: 730 Hi all, This patch is part of a few prerequisites to get target attribute support i= n AArch64. This registers the fma steering pass unconditionally but gates its executio= n instead. This way the pass will be available if during the compilation of a file the= user specifies cortex-a57 tuning using a target attribute or pragma, or whatever. Bootstrapped and tested on aarch64. Confirmed that the pass runs only when = expected. Ok for trunk? Thanks, Kyrill 2015-06-03 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_override_options): Unconditionally register fma steering pass. * config/aarch64/cortex-a57-fma-steering.c (gate): Add gating on AARCH64_TUNE_FMA_STEERING. --------------010701010208000004000803 Content-Type: text/x-patch; name=aarch64-register-fma-steering.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="aarch64-register-fma-steering.patch" Content-length: 1119 commit 58e5b728ae7f4cf4d00b732492b455bd6ca7feb6 Author: Kyrylo Tkachov Date: Fri May 8 17:16:51 2015 +0100 [AArch64] Always register fma_steering pass but gate it on the target o= ption instead diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 53aa4a8..1301e8b 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -7255,8 +7255,7 @@ aarch64_override_options (void) #endif } =20 - if (AARCH64_TUNE_FMA_STEERING) - aarch64_register_fma_steering (); + aarch64_register_fma_steering (); =20 aarch64_override_options_after_change (); } diff --git a/gcc/config/aarch64/cortex-a57-fma-steering.c b/gcc/config/aarc= h64/cortex-a57-fma-steering.c index 3d7557a..5228b57 100644 --- a/gcc/config/aarch64/cortex-a57-fma-steering.c +++ b/gcc/config/aarch64/cortex-a57-fma-steering.c @@ -1053,7 +1053,7 @@ public: /* opt_pass methods: */ virtual bool gate (function *) { - return optimize >=3D 2; + return AARCH64_TUNE_FMA_STEERING && optimize >=3D 2; } =20 virtual unsigned int execute (function *) --------------010701010208000004000803--