[PATCH 2/4 v2] bb-reorder: Add the "simple" algorithm

Segher Boessenkool segher@kernel.crashing.org
Fri Sep 25 16:15:00 GMT 2015


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



More information about the Gcc-patches mailing list