From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79288 invoked by alias); 8 Dec 2015 15:36:25 -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 79268 invoked by uid 89); 8 Dec 2015 15:36:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Dec 2015 15:36:23 +0000 Received: from tsaunders-iceball.corp.tor1.mozilla.com (unknown [63.85.5.103]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id 68C31C095; Tue, 8 Dec 2015 15:36:19 +0000 (UTC) Date: Tue, 08 Dec 2015 15:36:00 -0000 From: Trevor Saunders To: Jeff Law Cc: gcc-patches Subject: Re: [RFA] [PATCH] [PR tree-optimization/68619] Avoid direct cfg cleanups in tree-ssa-dom.c [1/3] Message-ID: <20151208122340.GA17982@tsaunders-iceball.corp.tor1.mozilla.com> References: <56667585.5040307@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56667585.5040307@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2015-12/txt/msg00882.txt.bz2 On Mon, Dec 07, 2015 at 11:15:33PM -0700, Jeff Law wrote: > > First in the series. This merely refactors code from tree-ssa-sccvn.c into > domwalk.c so that other walkers can use it as they see fit. > > > There's an initialization function which sets all edges to executable. > > There's a test function to see if a block is reachable. > > There's a propagation function to propagate the unreachable property to > edges. > > Finally a function to clear m_unreachable_dom. I consider this a wart. > Essentially that data member contains the highest unreachable block in the > dominator tree. Once we've finished processing that block's children, we > need to clear the member. Ideally clients wouldn't need to call this member > function. Hmm, I expect you thought about this, but why not always see if we need to clear it before calling after_dom_children () ? I think that would amount to an extra compare of a register and cached memory (we're just about to use the vtable pointer anyway) so I expect that wouldn't effect performance significantly. Thinking about this more I wonder if we could move more of this into the dom walker, and skip calling before / after dom_children on unreachable blocks all together. That would seem to work for sccvn, but I'm not sure about what tree-ssa-dom.c is doing with the mark pushing and clearing. Trev