From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9520 invoked by alias); 25 Sep 2015 16:04:03 -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 9421 invoked by uid 89); 25 Sep 2015 16:04:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 25 Sep 2015 16:04:01 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id t8PG3ua1000848; Fri, 25 Sep 2015 11:03:57 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id t8PG3uFw000847; Fri, 25 Sep 2015 11:03:56 -0500 Date: Fri, 25 Sep 2015 16:15:00 -0000 From: Segher Boessenkool To: Peter Bergner Cc: gcc-patches@gcc.gnu.org, bschmidt@redhat.com, stevenb.gcc@gmail.com Subject: Re: [PATCH 2/4 v2] bb-reorder: Add the "simple" algorithm Message-ID: <20150925160355.GA28511@gate.crashing.org> References: <20150925141608.GA21451@gate.crashing.org> <1443196777.13186.21.camel@otta> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443196777.13186.21.camel@otta> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg01989.txt.bz2 On Fri, Sep 25, 2015 at 10:59:37AM -0500, Peter Bergner wrote: > On Fri, 2015-09-25 at 09:16 -0500, Segher Boessenkool wrote: > > (reorder_basic_blocks): Choose between the STC and the simple > > algorithms (always choose the former). > [snip] > @@ -2274,7 +2444,10 @@ reorder_basic_blocks (void) > > set_edge_can_fallthru_flag (); > > mark_dfs_back_edges (); > > > > - reorder_basic_blocks_software_trace_cache (); > > + if (1) > > + reorder_basic_blocks_software_trace_cache (); > > + else > > + reorder_basic_blocks_simple (); > > Did you write the code this way because you're thinking of allowing > either reorder function to be called in the future? I _wrote_ it as "if (0)" actually, to test the new algo ;-) The next patch (3/4) wires up a new compiler flag to choose between the two algorithms. Segher