From patchwork Sat May 28 00:33:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 627375 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 3rGkPM5k2mz9t3w for ; Sat, 28 May 2016 10:32:54 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Pd3OqX/E; 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=feT+RR0B38pZSPDNJ ybELZ4Tz4xSZKNg2ld0MCddr74HACG+6SxnJKn5tCfCH18pNuyR5qG+KyzfNSENK j5mnbl3lUyq2whGF05rOR8aXNZCbSAvT9xNRZ2JVk3WqRk/YhPa38kE18LwPO9VB /cJXH+fgcQg7Im2wKGxZf944bI= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=Nk0yoyqfhUUV56Z4k7bj4ZW 9MwU=; b=Pd3OqX/EcNuG07eA9zodRifkBEisQyKPwUIHTSEl+RX9xeC+SnNPlXh 4lHnPTbG+UkFGeDBGEe5pujAEGp2Ownvp+Hd7gqylsHzRprgTpW/0Trh6isDlyAZ hJPB6GO+gUW1ykBObDIADYS3vIJlEnyXt8ZUVHylljElDJTYfsmk= Received: (qmail 28007 invoked by alias); 28 May 2016 00:32:47 -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 27992 invoked by uid 89); 28 May 2016 00:32:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=discovery X-HELO: mail-pf0-f195.google.com Received: from mail-pf0-f195.google.com (HELO mail-pf0-f195.google.com) (209.85.192.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 28 May 2016 00:32:44 +0000 Received: by mail-pf0-f195.google.com with SMTP id c84so7251639pfc.1 for ; Fri, 27 May 2016 17:32:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Px58MRF7vdr+YhG6vJXeVTJ0/D/aN7P3aIKcCkQLxyw=; b=ADkWjlC+zRXwLaltQljL5CPFgzmVcBMuyepm86QyiHkfqFXTd1IJuhXFydMXPOp1c7 12DlAQd5CHzjFekI+YwJ4rVmAO4vqMQJHHo9eqH4GgXEbOwMvlPX76pjdIDAuzbdu6fZ fExt7JEkEtWrXz2W33Ik/l86bSS7e6RV92kXrBlkU3gn0VcMTobxgPAG0YeC5cYwTnMm vLsr0uHKoRxWIgvdljyL+IDx/aTIhiuqxzYMFCI20ldOdScnTZsq6iBxRZuonSBi/WRq yiYv+9bEQRHkaGiUYX0updlKnhW6F6YBp4/RFPCjvp+MxdE/uYXCFLs7HvODrcj4paEe aAoA== X-Gm-Message-State: ALyK8tIz8bE2PJDfqRFfeX5bwo4YDT26ucNgMhbYqO7ZZ7RngIhMfZ6pAiOj46LxmIpIZA== X-Received: by 10.98.102.154 with SMTP id s26mr26618409pfj.41.1464395562878; Fri, 27 May 2016 17:32:42 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-146-233.sa.bigpond.net.au. [58.160.146.233]) by smtp.gmail.com with ESMTPSA id m64sm16328263pfc.19.2016.05.27.17.32.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 May 2016 17:32:42 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 9209AEA0199; Sat, 28 May 2016 10:03:03 +0930 (ACST) Date: Sat, 28 May 2016 10:03:03 +0930 From: Alan Modra To: Vladimir Makarov Cc: gcc-patches@gcc.gnu.org Subject: Re: Dominance related breakage, was Re: [PATCH] PR71275 ira.c bb_loop_depth Message-ID: <20160528003303.GL3300@bubble.grove.modra.org> References: <20160526110205.GJ3300@bubble.grove.modra.org> <5747043E.8090701@redhat.com> <20160527021447.GK3300@bubble.grove.modra.org> <5747B949.60909@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5747B949.60909@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes On Thu, May 26, 2016 at 11:04:41PM -0400, Vladimir Makarov wrote: > On 05/26/2016 10:14 PM, Alan Modra wrote: > >On Thu, May 26, 2016 at 10:12:14AM -0400, Vladimir Makarov wrote: > >>On 05/26/2016 07:02 AM, Alan Modra wrote: > >>>This fixes lack of bb_loop_depth info in some of the early parts of > >>>ira, which has been the case for quite some time. All active branches > >>>return 0 from bb_loop_depth() in update_equiv_regs, but whether that > >>>actually causes mis-optimization anywhere but trunk is yet to be > >>>determined. > >>> > >>>I played a little with trying to consolidate this loop_optimizer_init > >>>call with one that occurs a little later, but ran into ICEs. (We now > >>>have four calls to loop_optimizer_init in ira.c.) > >>> > >>>Bootstrapped and regression tested powerpc64le-linux and x86_64-linux. > >>>OK to apply? > >>> > >>Yes. Thank you, Alan. > >Hi Vlad, > >Sorry to do this to you and others, but the patch (committed as > >r236789) may be wrong. I didn't see any problems on trunk but when > >I backported to gcc-5, I hit an error in stage2 compiling > >insn-recog.c "dominator of 10 status unknown" from if_after_reload. > > > >On gcc-5, the error disappears by adding a call to > > free_dominance_info (CDI_DOMINATORS); > >after the newly added call to loop_optimizer_finalize. > > > >I'm not sure yet what is going on. Does anyone know whether the > >free_dominance_info call is needed on trunk? > > > That is ok. It is always a discovery. I am not sure but I think I saw this > problem when I wrote IRA. > > Looking at the dominance code, I seems to me that it can reuse the previous > info if it was not cleared. So I guess free_dominance_info is important. Given your comment, I've committed the following after running a full regression check. PR rtl-optimization/71275 * ira.c (ira): Free dominance info. diff --git a/gcc/ira.c b/gcc/ira.c index 1b269ea..3c4e3b6 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -5188,6 +5188,7 @@ ira (FILE *f) add_store_equivs (); loop_optimizer_finalize (); + free_dominance_info (CDI_DOMINATORS); end_alias_analysis (); free (reg_equiv);