This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 3/3] Loop flattening on loop-SSA.
On Tue, Nov 16, 2010 at 12:07 AM, Sebastian Pop <email@example.com> wrote:
> On Mon, Nov 15, 2010 at 17:01, Richard Guenther
> <firstname.lastname@example.org> 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. ?*/
> cancel_loop_tree (struct loop *loop)
> ?while (loop->inner)
> ? ?cancel_loop_tree (loop->inner);
> ?cancel_loop (loop);
delete_loop calls flow_loop_tree_node_remove which updates the loop
fathers loop sibling chain.