+2012-10-03 Dehao Chen <dehao@google.com>
+
+ PR middle-end/54782
+ * tree-cfg.c (move_block_to_fn): Update lexical block for phi_args.
+
2012-10-03 Vladimir Makarov <vmakarov@redhat.com>
* reginfo.c (max_regno_since_last_resize): New.
use_operand_p use;
tree op = PHI_RESULT (phi);
ssa_op_iter oi;
+ unsigned i;
if (virtual_operand_p (op))
{
SET_USE (use, replace_ssa_name (op, d->vars_map, dest_cfun->decl));
}
+ for (i = 0; i < EDGE_COUNT (bb->preds); i++)
+ {
+ location_t locus = gimple_phi_arg_location (phi, i);
+ tree block = LOCATION_BLOCK (locus);
+
+ if (locus == UNKNOWN_LOCATION)
+ continue;
+ if (d->orig_block == NULL_TREE || block == d->orig_block)
+ {
+ if (d->new_block == NULL_TREE)
+ locus = LOCATION_LOCUS (locus);
+ else
+ locus = COMBINE_LOCATION_DATA (line_table, locus, d->new_block);
+ gimple_phi_arg_set_location (phi, i, locus);
+ }
+ }
+
gsi_next (&si);
}