This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/3] Loop flattening on loop-SSA.
On Mon, Nov 15, 2010 at 17:01, Richard Guenther
<richard.guenther@gmail.com> wrote:
> Sure it would - cancel_loop_tree (loop->inner) makes loop->inner->next
> loop->inner. ?This is why cancel_loop_tree works in the first place.
I still cannot see how this code would cancel loop->next...
I see no occurrences of ->next in these functions:
/* Cancels the LOOP; it must be innermost one. */
static void
cancel_loop (struct loop *loop)
{
basic_block *bbs;
unsigned i;
struct loop *outer = loop_outer (loop);
gcc_assert (!loop->inner);
/* Move blocks up one level (they should be removed as soon as possible). */
bbs = get_loop_body (loop);
for (i = 0; i < loop->num_nodes; i++)
bbs[i]->loop_father = outer;
delete_loop (loop);
}
/* Cancels LOOP and all its subloops. */
void
cancel_loop_tree (struct loop *loop)
{
while (loop->inner)
cancel_loop_tree (loop->inner);
cancel_loop (loop);
}