This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] flow.c: Speed up delete_dead_jumptables.


Hi Jeff,

> > Attached is a patch to speed up delete_dead_jumptables by scanning
> > insns that do not belong to any basic block.  Note that jump tables do
> > not belong to any basic block.
> Good insight.

Thanks!  And thanks again for verifying that CFG is up-to-date at all
current call sites of delete_dead_jumptables.

> > The problem is that the improvement is so small.
> > 
> > Even for a large file like insn-attrtab.i, the running time of
> > delete_dead_jumptables goes down from 48.9ms to 36.5ms.  Yes, 25%
> > improvement but in milliseconds.
> Even so, just scanning between blocks is clearly more efficient than
> scanning the full insn chain.   The test you'd want to use would be
> one which has lots of insns in its blocks -- insn-attrtab.i doesn't
> really have that property - insn-attrtab.i has lots of blocks with a
> small number of insns in them.

In fact, other testcases show greater improvements, sometimes twice as
fast as the unpatched version.  Measurable with the x86's rdtsc
instruction, but not with more standard time command. :-(

> > 	* flow.c (delete_dead_jumptables): Speed up by scanning insns
> > 	that do not belong to any basic block.
> Looks good to me.

Can I take this as an approval?

Kazu Hirata


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]