From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9034 invoked by alias); 24 Oct 2014 17:48:23 -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 9020 invoked by uid 89); 24 Oct 2014 17:48:22 -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,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 24 Oct 2014 17:48:21 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9OHmKb3009654 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Oct 2014 13:48:20 -0400 Received: from [10.3.113.50] (ovpn-113-50.phx2.redhat.com [10.3.113.50]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9OHmJlD000799; Fri, 24 Oct 2014 13:48:19 -0400 Message-ID: <544A90E2.7090405@redhat.com> Date: Fri, 24 Oct 2014 17:52:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Richard Biener , gcc-patches@gcc.gnu.org CC: Jakub Jelinek Subject: Re: [PATCH][6/n] Merge from match-and-simplify, make forwprop fold all stmts References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg02587.txt.bz2 On 10/24/14 07:16, Richard Biener wrote: > > This patch makes GIMPLE forwprop fold all statements, following > single-use SSA edges only (as suggested by Jeff and certainly > how this will regress the least until we replace manual > simplification code that does not restrict itself this way). > > forwprop is run up to 4 times at the moment (once only for -Og, > not at all for -O0), which still seems reasonable. IMHO the > forwprop pass immediately after inlining is somewhat superfluous, > it was added there just for its ADDR_EXPR propagation. We should > eventually split this pass into two. > > Note that just folding what we propagated into (like the SSA > propagators do during substitute-and-fold phase) will miss > cases where we propagate into a stmt feeding the one we could > simplify. Unless we always fold all single-use (and their use) > stmts we have to fold everything from time to time. Changing > how / when we fold stuff is certainly sth to look after with > fold_stmt now being able to follow SSA edges. > > Bootstrapped on x86_64-unknown-linux-gnu, testing still in progress. > > From earlier testing I remember I need to adjust a few testcases > that don't expect the early folding - notably two strlenopt cases > (previously XFAILed but then PASSed again). > > I also expect to massage the single-use heuristic as I get to > merging the patterns I added for the various forwprop manual > pattern matchings to trunk (a lot of them do not restrict themselves > this way). > > Does this otherwise look ok? > > Thanks, > Richard. > > 2014-10-24 Richard Biener > > * tree-ssa-forwprop.c: Include tree-cfgcleanup.h and tree-into-ssa.h. > (lattice): New global. > (fwprop_ssa_val): New function. > (fold_all_stmts): Likewise. > (pass_forwprop::execute): Finally fold all stmts. Seems reasonable. After all, we can iterate on the single-use heuristic. jeff