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]

Re: crossjumping speedups


> On Fri, Jul 20, 2001 at 08:56:52PM +0200, Jan Hubicka wrote:
> > !          Avoid duplicated work by ensuring that at least one of edges
> > !          is the first outgoing edge.  This way we try each combination
> > !          maximally twice, instead of N ougoing edges ^ 2.  */
> >         if (e != fallthru && fallthru
> > + 	  && (e->src->succ == e || fallthru->src->succ == fallthru)
> [...]
> > ! 	        && (e->src->succ == e || e2->src->succ == e2)
> 
> Everything but this is ok.  You cannot assume order on edges.
Unfortunately, this part is most important one.
I am not assuming any particular order.  All I assume that one of edges
is the first edge.

Imagine blocks A and B, every containing tablejump with 10 outgoing edges.
These blocks are not equivalent, but 9 of edges are.  What I do is checking
these two block for equality in any of these 9 meeting blocks.  With the test
above I test only on two blocks.

I don't need any particular order, as, if the blocks are crossjumpable, all
the outgoing edges are equivalent.  I just need to pick one of edges as the
"good edge to try".

For the common case of conditional jump it reduces number from 4 to 2, usually
1, still worth 50% speedup.

Honza
> 
> 
> r~


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