some tree-ssa vs mainline stats
Dan Nicolaescu
dann@ics.uci.edu
Thu Jun 19 19:32:00 GMT 2003
law@redhat.com writes:
> In message <200306182344.h5INi34X020009@gremlin.ics.uci.edu>, Dan Nicolaescu writes:
> >Total number # of insns in .00.rtl
> >generate-3.4.ii SSA 417674
> >generate-3.4.ii HEAD 728202
> >combine.i SSA 41528
> >combine.i HEAD 35524
> I don't know if the reduction in insns for generate.ii is due to tree-ssa
> optimizing better or doing something like not inlining as well. I tend to
> suspect the latter as most of the time it tends to produce more insns
> than without tree-ssa.
Part of the reason is that tree-ssa is emitting a LOT less
NOTE_INSN_DELETED insns, which are about 1/3 of the total number of
insns for mainline when compiling the code from PR8361.
More observations, looking at the generate-3.4.ii.t15.optimized dump,
there's a lot of code that looks like this:
{
struct GATOM * const * const & __i;
struct __normal_iterator<const GATOM* const*,std::vector<const GATOM*, std::allocator<const GATOM*> > > * const this;
this = (struct __normal_iterator<const GATOM* const*,std::vector<const GATOM*, std::allocator<const GATOM*> > > * const)T.9559;
{
struct iterator<std::random_access_iterator_tag,const GATOM*,int,const GATOM* const*,const GATOM* const&> * this.9553;
{ // THIS BLOCK CAN BE ELIMINATED
struct iterator<std::random_access_iterator_tag,const GATOM*,int,const GATOM* const*,const GATOM* const&> * const this;
(void)0
};
this->_M_current = *T.9563
}
}
It seems that DCE is getting confused by "this", so it doesn't
eliminate the inner block of dead code.
Also there's a lot of "if (1)" and "if (0)" code.
--dan
More information about the Gcc
mailing list