On Wed, Dec 12, 2012 at 1:08 PM, Steven Bosscher <stevenb....@gmail.com> wrote: > On Wed, Dec 12, 2012 at 11:46 AM, Richard Biener wrote: >> On Tue, Dec 11, 2012 at 8:57 PM, Steven Bosscher wrote: >> I'm not sure we want to give up this: >> >> @@ -863,12 +863,13 @@ get_loop_body_in_dom_order (const struct loop *loo >> basic_block *tovisit; >> int tv; >> >> + if (loop->latch == EXIT_BLOCK_PTR) >> + return get_loop_body (loop); >> + >> gcc_assert (loop->num_nodes); >> >> tovisit = XNEWVEC (basic_block, loop->num_nodes); >> >> - gcc_assert (loop->latch != EXIT_BLOCK_PTR); >> - >> >> assert. It makes sure nobody treats the root loop node as real loop ... > > Well, as you can see, get_loop_body does handle this case already. So > if you use plain get_loop_body, you get the body of the root node > returned.
Yes, but with your "fix" get_loop_body_in_dom_order would actually _not_ return the body in DOM order. I wonder what it does with a noreturn call inside a inner loop body. Without fake exit/loop edges things are going to break anyway I guess (so for 4.9 eventually just remove the assert and require fake edges setup?) >> So, can you special-case this in your dumping routines instead? > > Sure. Thanks, Richard. > >> That makes it a dump-only patch and thus ok. (indeed much nicer to look >> at loop preserve issues this way!) > > Ciao! > Steven