This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] cluster loop bodies in CFG graph dumping
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.
> So, can you special-case this in your dumping routines instead?
Sure.
> That makes it a dump-only patch and thus ok. (indeed much nicer to look
> at loop preserve issues this way!)
Ciao!
Steven