On 09/24/2015 12:06 AM, Segher Boessenkool wrote:
This is the meat of this series: a new algorithm to do basic block
reordering. It uses the simple greedy approach to maximum weighted
matching, where the weights are the predicted execution frequency of
the edges. This always finds a solution
On Thu, Sep 24, 2015 at 12:32:59PM +0200, Bernd Schmidt wrote:
> On 09/24/2015 12:06 AM, Segher Boessenkool wrote:
> >This is the meat of this series: a new algorithm to do basic block
> >reordering. It uses the simple greedy approach to maximum weighted
> >matching, where the weights are the
On Thu, Sep 24, 2015 at 08:39:30AM -0500, Segher Boessenkool wrote:
> > Any thoughts on this vs qsort? Do you need a stable sort?
>
> We always need stable sorts in GCC; things are not reproducible across
> targets with qsort (not every qsort is the same).
s/targets/hosts/
On Thu, Sep 24, 2015 at 12:06 AM, Segher Boessenkool wrote:
> + /* First, collect all edges that can be optimized by reordering blocks:
> + simple jumps and conditional jumps, as well as the function entry edge.
> */
> +
> + int n = 0;
> + edges[n++] = EDGE_SUCC (ENTRY_BLOCK_PTR_FOR_FN
On Thu, Sep 24, 2015 at 06:03:33PM +0200, Steven Bosscher wrote:
> On Thu, Sep 24, 2015 at 12:06 AM, Segher Boessenkool wrote:
> > + /* First, collect all edges that can be optimized by reordering blocks:
> > + simple jumps and conditional jumps, as well as the function entry
> > edge. */
>
This is the meat of this series: a new algorithm to do basic block
reordering. It uses the simple greedy approach to maximum weighted
matching, where the weights are the predicted execution frequency of
the edges. This always finds a solution that is within a factor two
of optimal, if you