> On Thu, Jan 26, 2017 at 11:04 AM, Jan Hubicka <hubi...@ucw.cz> wrote:
> >> > +      if (!contains_hot_bb && speed_p)
> >> > +       contains_hot_bb |= optimize_bb_for_speed_p (bb);
> >> > +
> >>
> >> Hmm, but you are also counting the destination of the threading here
> >> which we will
> >> not duplicate.  Shouldn't this be under the if (j < path_length - 1)
> >> conditional so we
> >> look for hot BBs we are actually duplicating only (similar restrictions 
> >> apply to
> >> path[0]?).
> >
> > Aha, you are right.  I am re-testing updated patch (it also solves the PR)
> 
> What about j == 0?  We don't duplicate that block either.

We do duplicate it, just eliminate the control flow at the end of bb
(j==0 is the last basic block of path containing the control flow being 
threaded)

I am updating patch actually print into details dump file what paths are 
considered
and what insn counts are counted.

Honza

Reply via email to