diff options
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 7ec04f70fad..e8033cd46ca 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -53,7 +53,7 @@ static struct pointer_map_t *edge_var_maps; /* Add a mapping with PHI RESULT and PHI DEF associated with edge E. */ void -redirect_edge_var_map_add (edge e, tree result, tree def) +redirect_edge_var_map_add (edge e, tree result, tree def, source_location locus) { void **slot; edge_var_map_vector old_head, head; @@ -71,6 +71,7 @@ redirect_edge_var_map_add (edge e, tree result, tree def) } new_node.def = def; new_node.result = result; + new_node.locus = locus; VEC_safe_push (edge_var_map, heap, head, &new_node); if (old_head != head) @@ -193,14 +194,16 @@ ssa_redirect_edge (edge e, basic_block dest) for (gsi = gsi_start_phis (e->dest); !gsi_end_p (gsi); gsi_next (&gsi)) { tree def; + source_location locus ; phi = gsi_stmt (gsi); def = gimple_phi_arg_def (phi, e->dest_idx); + locus = gimple_phi_arg_location (phi, e->dest_idx); if (def == NULL_TREE) continue; - redirect_edge_var_map_add (e, gimple_phi_result (phi), def); + redirect_edge_var_map_add (e, gimple_phi_result (phi), def, locus); } e = redirect_edge_succ_nodup (e, dest); @@ -233,7 +236,7 @@ flush_pending_stmts (edge e) phi = gsi_stmt (gsi); def = redirect_edge_var_map_def (vm); - add_phi_arg (phi, def, e); + add_phi_arg (phi, def, e, redirect_edge_var_map_location (vm)); } redirect_edge_var_map_clear (e); |