From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25580 invoked by alias); 26 Feb 2018 13:46:16 -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 25195 invoked by uid 89); 26 Feb 2018 13:46:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:52b8 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Feb 2018 13:46:12 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1eqJ6Y-00063b-Ty from Tom_deVries@mentor.com ; Mon, 26 Feb 2018 05:46:10 -0800 Received: from [172.30.72.149] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 26 Feb 2018 13:46:07 +0000 Subject: Re: [PATCH, PR83327] Fix liveness analysis in lra for spilled-into hard regs To: Matthew Fortune CC: Vladimir Makarov , "gcc-patches@gcc.gnu.org" , "Moore, Catherine" References: <5794f39e-42ef-66da-e7f5-270ebc54cdf2@redhat.com> <98df25f2-0282-7eca-f6d9-c320c023ec0d@mentor.com> <5ae37149-3559-8221-fc74-68f4e90ff4de@redhat.com> <12e6eeea-ba32-bdcf-1e42-6480b0bbad32@mentor.com> <41dbb89c-0592-e474-849a-f6928a6135c4@redhat.com> <189821d4-1494-e47e-beeb-76a4219a206b@mentor.com> <7739e43f-3525-3114-c792-54d5a384bebe@mentor.com> <22DC0315F97E854EABE5B749527587D52BBCBED8@MIPSMAIL01.mipstec.com> From: Tom de Vries Message-ID: <96a64ae3-52b8-eb8a-7c31-8a65f3ed0d07@mentor.com> Date: Mon, 26 Feb 2018 13:46:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <22DC0315F97E854EABE5B749527587D52BBCBED8@MIPSMAIL01.mipstec.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-SW-Source: 2018-02/txt/msg01421.txt.bz2 On 02/26/2018 12:00 PM, Matthew Fortune wrote: > Tom de Vries writes: >> On 01/08/2018 05:32 PM, Tom de Vries wrote: >>> On 12/18/2017 05:57 PM, Vladimir Makarov wrote: >>>> >>>> >>>> On 12/15/2017 06:25 AM, Tom de Vries wrote: >>>>> >>>>> Proposed Solution: >>>>> >>>>> The patch addresses the problem, by: >>>>> - marking the hard regs that have been used in lra_spill in >>>>>   hard_regs_spilled_into >>>>> - using hard_regs_spilled_into in lra_create_live_ranges to >>>>>   make sure those registers are marked in the conflict_hard_regs >>>>>   of pseudos that overlap with the spill register usage >>>>> >>>>> [ I've also tried an approach where I didn't use >>>>> hard_regs_spilled_into, but tried to propagate all hard regs. I >>>>> figured out that I needed to mask out eliminable_regset.  Also I >>>>> needed to masked out lra_no_alloc_regs, but that could be due to >>>>> gcn-specific problems (pointers take 2 hard regs), I'm not yet sure. >>>>> Anyway, in the submitted patch I tried to avoid these problems and >>>>> went for the more minimal approach. ] >>>>> >>>> Tom, thank you for the detail explanation of the problem and >>>> solutions you considered.  It helped me a lot.  Your simple solution >>>> is adequate as the most transformations and allocation are done on >>>> the 1st LRA subpasses iteration. >>>>> In order to get the patch accepted for trunk, I think we need: >>>>> - bootstrap and reg-test on x86_64 >>>>> - build and reg-test on mips (the only primary platform that has the >>>>>   spill_class hook enabled) >>>>> >>>>> Any comments? >>>> >>>> The patch looks ok to me.  You can commit it after successful testing >>>> on x86-64 and mips but I am sure there will be no problems with >>>> x86-64 as it does not use spill_class currently (actually your patch >>>> might help to switch it on again for x86-64.  spill_class was quite >>>> useful for x86-64 performance on Intel processors). >>>> >>> >>> Hi Matthew, >>> >>> there's an lra optimization that is currently enabled for MIPS, and >>> not for any other primary or secondary target. >>> >>> This (already approved) patch fixes a bug in that optimization, and >>> needs to be tested on MIPS. >>> >>> Unfortunately, the optimization is only enabled for MIPS16, and we >>> don't have a current setup to test this. >>> >>> Could you help us out here and test this patch for MIPS16 on trunk? >> >> Hi Matthew, >> >> is this something you can help us out with? > > Hi Tom, > > I've just commented on the bug report that I've set of some builds to try > and give some assurance. It is far from comprehensive but it is as good as > the normal testing I do for MIPS16. > Hi Matthew, Awesome, thanks for the help. - Tom