From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18999 invoked by alias); 22 Apr 2015 16:18:11 -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 18959 invoked by uid 89); 22 Apr 2015 16:18:10 -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) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Apr 2015 16:18:05 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-19.uk.mimecast.lan; Wed, 22 Apr 2015 17:18:02 +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, 22 Apr 2015 17:18:01 +0100 Message-ID: <5537C9B9.5090501@arm.com> Date: Wed, 22 Apr 2015 16:18: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: Ramana Radhakrishnan , Richard Earnshaw Subject: [PATCH][ARM] Do not lower cost of setting core reg to constant. It doesn't have any effect X-MC-Unique: 6ZEq9nWlT5K6G_MOelpRvA-1 Content-Type: multipart/mixed; boundary="------------030103040608090905000909" X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01330.txt.bz2 This is a multi-part message in MIME format. --------------030103040608090905000909 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-length: 643 Hi all, This hunk that slightly reduces the cost of immediate moves doesn't actuall= y have any effect. In the whole of SPEC2006 it didn't make a difference. In any case, I'd like= to move to a point where we use COSTS_N_INSNS units for our costs and not increment decrement = them by one. This patch removes that bit of logic and makes it slightly cleaner to look = at. As far as I know its logic has never been confirmed in practice. Bootstrapped and tested on arm. Ok for trunk? Thanks, Kyrill 2015-04-22 Kyrylo Tkachov * config/arm/arm.c (arm_new_rtx_costs): Do not lower cost immediate moves. --------------030103040608090905000909 Content-Type: text/x-patch; name=arm-costs-reg-core-lower.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="arm-costs-reg-core-lower.patch" Content-length: 992 commit e225669ff70f09520007b7898b170fb8fa75281f Author: Kyrylo Tkachov Date: Wed Apr 8 10:18:23 2015 +0100 [ARM] Do not lower cost of setting core reg to constant. It doesn't hav= e any effect diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 0ef05c9..03988ac 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -9725,11 +9725,7 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum r= tx_code outer_code, and we would otherwise be unable to work out the true cost. */ *cost =3D rtx_cost (SET_DEST (x), SET, 0, speed_p); outer_code =3D SET; - /* Slightly lower the cost of setting a core reg to a constant. - This helps break up chains and allows for better scheduling. */ - if (REG_P (SET_DEST (x)) - && REGNO (SET_DEST (x)) <=3D LR_REGNUM) - *cost -=3D 1; + x =3D SET_SRC (x); /* Immediate moves with an immediate in the range [0, 255] can be encoded in 16 bits in Thumb mode. */ --------------030103040608090905000909--