Re: Ping: RFA: Improve doloop_begin support

2012-10-16 Thread Richard Biener
On Tue, Oct 16, 2012 at 4:30 PM, Joern Rennecke wrote: > Quoting Zdenek Dvorak : > >> no -- you should also test that latch contains no active insns. I.e., >> factorize >> out whatever forwarder_block_p does except for the test >> "(dest->loop_father->header == dest)" test, > > > Like this? IST

Re: Ping: RFA: Improve doloop_begin support

2012-10-16 Thread Zdenek Dvorak
> Quoting Zdenek Dvorak : > > >no -- you should also test that latch contains no active insns. > >I.e., factorize > >out whatever forwarder_block_p does except for the test > >"(dest->loop_father->header == dest)" test, > > Like this? > > * basic-block.h (forwarder_block_p_1): Declare. >

Re: Ping: RFA: Improve doloop_begin support

2012-10-16 Thread Joern Rennecke
Quoting Zdenek Dvorak : no -- you should also test that latch contains no active insns. I.e., factorize out whatever forwarder_block_p does except for the test "(dest->loop_father->header == dest)" test, Like this? * basic-block.h (forwarder_block_p_1): Declare. * cfgrtl

Re: Ping: RFA: Improve doloop_begin support

2012-10-16 Thread Zdenek Dvorak
Hi, > The loop appears to be entered at the top, yet both my original and your test > fail. > > Looking what happens with your test in more detail, I find that > > loop->latch == desc->in_edge->dest > > is true, but forwarder_block_p (loop->latch) fails: > > 562 if (dest->loop_fathe

Re: Ping: RFA: Improve doloop_begin support

2012-10-16 Thread Joern Rennecke
Quoting Zdenek Dvorak : + entered_at_top = loop_preheader_edge (loop)->dest == desc->in_edge->dest; is equivalent to + entered_at_top = loop->header == desc->in_edge->dest; But, I don't think it will do what you want. Loops are canonicalized so that their latch blocks have single successor

Re: Ping: RFA: Improve doloop_begin support

2012-10-16 Thread Zdenek Dvorak
Hi, > 2012-09-26 J"orn Rennecke > > * loop-doloop.c (doloop_modify): Pass doloop_end pattern to > gen_doloop_begin. > * loop-doloop.c (doloop_optimize): Pass flag to indicate if loop is > entered at top to gen_doloop_end. > * config/arm/thumb2.md (doloop_e

Ping: RFA: Improve doloop_begin support

2012-10-14 Thread Joern Rennecke
2012-09-26 J"orn Rennecke * loop-doloop.c (doloop_modify): Pass doloop_end pattern to gen_doloop_begin. * loop-doloop.c (doloop_optimize): Pass flag to indicate if loop is entered at top to gen_doloop_end. * config/arm/thumb2.md (doloop_end): Accept extr

RFA: Improve doloop_begin support

2012-09-26 Thread Joern Rennecke
ARCompact is one of the architectures that have zero-overhead loops that are initiated with an instruction at the loop top. There is a way to set up loops before jumping into their middle, by poking values into control registers, but that method is more costly and thus only pays off with a higher