aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/gcc/tree-inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.4.3/gcc/tree-inline.c')
-rw-r--r--gcc-4.4.3/gcc/tree-inline.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc-4.4.3/gcc/tree-inline.c b/gcc-4.4.3/gcc/tree-inline.c
index 579fd81fb..decae7a4c 100644
--- a/gcc-4.4.3/gcc/tree-inline.c
+++ b/gcc-4.4.3/gcc/tree-inline.c
@@ -1740,12 +1740,13 @@ copy_phis_for_bb (basic_block bb, copy_body_data *id)
edge_iterator ei;
gimple phi;
gimple_stmt_iterator si;
+ edge new_edge;
+ bool inserted = false;
for (si = gsi_start (phi_nodes (bb)); !gsi_end_p (si); gsi_next (&si))
{
tree res, new_res;
gimple new_phi;
- edge new_edge;
phi = gsi_stmt (si);
res = PHI_RESULT (phi);
@@ -1774,13 +1775,19 @@ copy_phis_for_bb (basic_block bb, copy_body_data *id)
{
gimple_seq stmts = NULL;
new_arg = force_gimple_operand (new_arg, &stmts, true, NULL);
- gsi_insert_seq_on_edge_immediate (new_edge, stmts);
+ gsi_insert_seq_on_edge (new_edge, stmts);
+ inserted = true;
}
add_phi_arg (new_phi, new_arg, new_edge,
gimple_phi_arg_location_from_edge (phi, old_edge));
}
}
}
+
+ /* Commit the delayed edge insertions. */
+ if (inserted)
+ FOR_EACH_EDGE (new_edge, ei, new_bb->preds)
+ gsi_commit_one_edge_insert (new_edge, NULL);
}