[PATCH 3/3] Loop flattening on loop-SSA.

Sebastian Pop sebpop@gmail.com
Mon Nov 15 23:35:00 GMT 2010


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);
}



More information about the Gcc-patches mailing list