On Sat, 2014-12-06 at 19:21 +0000, Sebastian Pop wrote:

> > I think it does not make sense to duplicate paths at -Os: I disabled the FSM
> > jump-threading when optimizing for size like this.
> > 
> > diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
> > index 29b20c8..ce70311 100644
> > --- a/gcc/tree-ssa-threadedge.c
> > +++ b/gcc/tree-ssa-threadedge.c
> > @@ -1335,8 +1335,9 @@ thread_through_normal_block (edge e,
> >           return 1;
> >         }
> >  
> >        if (!flag_expensive_optimizations
> > +         || optimize_function_for_size_p (cfun)
> >           || TREE_CODE (cond) != SSA_NAME
> >           || e->dest->loop_father != e->src->loop_father
> >           || loop_depth (e->dest->loop_father) == 0)
> >         return 0;
> > 
> > I will regstrap and commit the attached patch.
> 
> Bootstrapped and regression tested on x86_64-linux.
> Committed r218451.
> 
> Sebastian

Thanks for getting all this checked in Sebastian, I have tested it on
coremark and I am getting the speed up that I expect.  But I am a little
confused about turning off jump threading.  I am getting the
optimization on coremark with -O3 and that is great and if I use '-O3
-fno-expensive-optimizations' then I don't see this part of the jump
threading, also great.  But I was surprised that if I just used '-O3
-fno-thread-jumps' then I still see this optimization.  Is that
expected?  Should this test also check flag_thread_jumps?  Or should
that be getting checked somewhere else?

Steve Ellcey


Reply via email to