All pastes #965805 Raw Edit

fuse_loops

public text v1 · immutable
·published 2008-04-01 06:39 UTC
rendered paste body
void
fuse_loops (struct loop *loop_a, struct loop *loop_b)
{
  debug_loop (loop_a, 10);
  debug_loop (loop_b, 10);
  block_stmt_iterator bsi_a = bsi_start (loop_a->header);
  block_stmt_iterator bsi_b = bsi_last (loop_b->header);
  bsi_move_before (&bsi_a, &bsi_b);
  fprintf (stderr, " moved 1 stmt from %d to %d ", loop_a->num, loop_b->num);
  debug_loop (loop_a, 10);
  debug_loop (loop_b, 10);
  cancel_loop_tree (loop_a);
}

I get a segmentation fault before cancel_loop_tree (loop_a);

Can any one please tell me what is the mistake?