From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70976 invoked by alias); 20 Sep 2016 15:26: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 70386 invoked by uid 89); 20 Sep 2016 15:26:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Robin, robin, simplifications, before_d X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Sep 2016 15:26:09 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 97DA581F03; Tue, 20 Sep 2016 15:26:08 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-2.phx2.redhat.com [10.3.116.2]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8KFQ8Is031462; Tue, 20 Sep 2016 11:26:08 -0400 Subject: Re: [PATCH] Tree-level fix for PR 69526 To: Robin Dapp , Richard Biener References: <5790A709.4060804@linux.vnet.ibm.com> <6bc1abab-9b54-fb67-fe98-9aaf993859dd@linux.vnet.ibm.com> Cc: GCC Patches From: Jeff Law Message-ID: <219f9980-d5a2-e807-cd45-650f079cf6e1@redhat.com> Date: Tue, 20 Sep 2016 15:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <6bc1abab-9b54-fb67-fe98-9aaf993859dd@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg01322.txt.bz2 On 09/20/2016 06:31 AM, Robin Dapp wrote: > Hi, > >> I meant to do sth like >> >> Index: tree-ssa-propagate.c >> =================================================================== >> --- tree-ssa-propagate.c (revision 240133) >> +++ tree-ssa-propagate.c (working copy) >> @@ -1105,10 +1105,10 @@ substitute_and_fold_dom_walker::before_d >> /* Replace real uses in the statement. */ >> did_replace |= replace_uses_in (stmt, get_value_fn); >> >> - /* If we made a replacement, fold the statement. */ >> - if (did_replace) >> + /* Fold the statement. */ >> + if (fold_stmt (&i, follow_single_use_edges)) >> { >> - fold_stmt (&i, follow_single_use_edges); >> + did_replace = true; >> stmt = gsi_stmt (i); >> } >> >> this would need compile-time cost evaluation (and avoid the tree-vrp.c >> folding part >> of your patch). > > Using this causes the simplifications to be performed in ccp1 instead of > fwprop1. I noticed two tests failing that rely on propagation being > performed in fwprop. Should these be adapted or rather the patch be changed? ISTM this is an indication that something changed the IL without folding prior to ccp & forwprop. That's not in and of itself bad, but may be worth investigating to see if whatever prior pass that made this change ought to be adjusted. That investigation would likely guide you with what to do with the testcase. If you find that the earlier pass should have folded, then you fix it and change the testcase to verify the earlier pass folded properly. Else you change the testcase to verify ccp folds the statement. I'm going to let Richi own the review on this. Just thought I'd chime in on that one topic. jeff