Commit 066b8354 by Aldy Hernandez Committed by Richard Henderson

* cfghooks.c (copy_bbs): Handle a null loop_father.

From-SVN: r193270
parent 27f7e1c3
2012-11-06 Aldy Hernandez <aldyh@redhat.com>
* cfghooks.c (copy_bbs): Handle a null loop_father.
* cgraph.c (cgraph_debug_gimple_stmt): Handle a null
current_function_decl.
......@@ -1258,12 +1258,15 @@ copy_bbs (basic_block *bbs, unsigned n, basic_block *new_bbs,
new_bb = new_bbs[i] = duplicate_block (bb, NULL, after);
after = new_bb;
bb->flags |= BB_DUPLICATED;
/* Possibly set loop header. */
if (bb->loop_father->header == bb && bb->loop_father != base)
new_bb->loop_father->header = new_bb;
/* Or latch. */
if (bb->loop_father->latch == bb && bb->loop_father != base)
new_bb->loop_father->latch = new_bb;
if (bb->loop_father)
{
/* Possibly set loop header. */
if (bb->loop_father->header == bb && bb->loop_father != base)
new_bb->loop_father->header = new_bb;
/* Or latch. */
if (bb->loop_father->latch == bb && bb->loop_father != base)
new_bb->loop_father->latch = new_bb;
}
}
/* Set dominators. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment