aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.c
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2012-07-10 04:28:32 +0000
committerDehao Chen <dehao@gcc.gnu.org>2012-07-10 04:28:32 +0000
commite53a3e778e70af499292522144fb8d4bea5279cb (patch)
tree9452b0caf38ccada7226e238193cb8e3a7344571 /gcc/tree-cfgcleanup.c
parent1ee4995ff7fea7da0e592e21b3d7ada8fb2361f6 (diff)
downloadgcc-e53a3e778e70af499292522144fb8d4bea5279cb.zip
gcc-e53a3e778e70af499292522144fb8d4bea5279cb.tar.gz
gcc-e53a3e778e70af499292522144fb8d4bea5279cb.tar.bz2
tree.h (phi_arg_d): New field.
2012-07-10 Dehao Chen <dehao@google.com> * tree.h (phi_arg_d): New field. * tree-flow-inline.h (gimple_phi_arg_block): New function. (gimple_phi_arg_block_from_edge): New function. (gimple_phi_arg_set_block): New function. (gimple_phi_arg_has_block): New function. (redirect_edge_var_map_block): New function. * tree-flow.h (_edge_var_map): New field. * tree-ssa-live.c (remove_unused_locals): Mark phi_arg's block as used. * tree-eh.c (cleanup_empty_eh_merge_phis): Add block debug info for redirect_edge_var_map_add. * tree-outof-ssa.c (_elim_graph): New field. (insert_partition_copy_on_edge): New parameter. (insert_value_copy_on_edge): New parameter. (insert_rtx_to_part_on_edge): New parameter. (insert_part_to_rtx_on_edge): New parameter. (elim_graph_add_edge): New parameter. (elim_graph_remove_succ_edge): New parameter. (FOR_EACH_ELIM_GRAPH_SUCC): New parameter. (FOR_EACH_ELIM_GRAPH_PRED): New parameter. (new_elim_graph): Add block debug info. (clear_elim_graph): Likewise. (delete_elim_graph): Likewise. (elim_graph_add_node): Likewise. (elim_graph_add_edge): Likewise. (elim_graph_remove_succ_edge): Likewise. (eliminate_build): Likewise. (elim_forward): Likewise. (elim_unvisited_predecessor): Likewise. (elim_backward): Likewise. (elim_create): Likewise. (eliminate_phi): Likewise. (insert_backedge_copies): Likewise. * tree-into-ssa.c (insert_phi_nodes_for): Add block debug info for add_phi_arg. (rewrite_add_phi_arguments): Likewise. * tree-ssa-loop-im.c (execute_sm_if_changed): Likewise. * tree-ssa-tail-merge.c (replace_block_by): Likewise. * tree-ssa-threadupdate.c (copy_phi_args): Likewise. * tree-loop-distribution.c (update_phis_for_loop_copy): Likewise. * tree-ssa-loop-manip.c (create_iv): Likewise. (add_exit_phis_edge): Likewise. (split_loop_exit_edge): Likewise. (copy_phi_node_args): Likewise. (tree_transform_and_unroll_loop): Likewise. * value-prof.c (gimple_ic): Likewise. (gimple_stringop_fixed_value): Likewise. * tree-tailcall.c (add_successor_phi_arg): Likewise. (eliminate_tail_call): Likewise. (create_tailcall_accumulator): Likewise. (tree_optimize_tail_calls_1): Likewise. * tree-phinodes.c (add_phi_arg): Likewise. (make_phi_node): Likewise. (resize_phi_node): Likewise. (remove_phi_arg_num): Likewise. * omp-low.c (expand_parallel_call): Likewise. (expand_omp_for_static_chunk): Likewise. * tree-vect-loop-manip.c (slpeel_update_phis_for_duplicate_loop): Likewise. (slpeel_update_phi_nodes_for_guard1): Likewise. (slpeel_update_phi_nodes_for_guard2): Likewise. (slpeel_tree_duplicate_loop_to_edge_cfg): Likewise. (set_prologue_iterations): Likewise. (slpeel_tree_peel_loop_to_edge): Likewise. (vect_loop_versioning): Likewise. * tree-parloops.c (create_phi_for_local_result): Likewise. (transform_to_exit_first_loop): Likewise. (create_parallel_loop): Likewise. * ipa-split.c (split_function): Likewise. * tree-vect-loop.c (get_initial_def_for_induction): Likewise. (vect_create_epilog_for_reduction): Likewise. * tree-vect-data-refs.c (vect_setup_realignment): Likewise. * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Likewise. * tree-ssa-phiopt.c (cond_store_replacement): Likewise. (cond_if_else_store_replacement_1): Likewise. * tree-cfgcleanup.c (remove_forwarder_block): Likewise. (remove_forwarder_block_with_phi): Likewise. * tree-ssa-pre.c (insert_into_preds_of_block): Likewise. * tree-predcom.c (initialize_root_vars): Likewise. (initialize_root_vars_lm): Likewise. * sese.c (sese_add_exit_phis_edge): Likewise. * tree-ssa-dce.c (forward_edge_to_pdom): Likewise. * tree-ssa.c (flush_pending_stmts): Likewise. (redirect_edge_var_map_add): Likewise. (ssa_redirect_edge): Likewise. * gimple-streamer-in.c (input_phi): Likewise. * tree-vect-stmts.c (vectorizable_load): Likewise. * tree-inline.c (copy_phis_for_bb): Likewise. * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise. * tree-switch-conversion.c (fix_phi_nodes): Likewise. * tree-cfg.c (reinstall_phi_args): Likewise. (gimple_make_forwarder_block): Likewise. (add_phi_args_after_copy_edge): Likewise. (gimple_duplicate_sese_tail): Likewise. From-SVN: r189402
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r--gcc/tree-cfgcleanup.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 78583c4..a5fbd75 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -444,7 +444,9 @@ remove_forwarder_block (basic_block bb)
{
gimple phi = gsi_stmt (gsi);
source_location l = gimple_phi_arg_location_from_edge (phi, succ);
- add_phi_arg (phi, gimple_phi_arg_def (phi, succ->dest_idx), s, l);
+ tree b = gimple_phi_arg_block_from_edge (phi, succ);
+ add_phi_arg (phi, gimple_phi_arg_def (phi, succ->dest_idx), s, l,
+ b);
}
}
}
@@ -871,6 +873,7 @@ remove_forwarder_block_with_phi (basic_block bb)
gimple phi = gsi_stmt (gsi);
tree def = gimple_phi_arg_def (phi, succ->dest_idx);
source_location locus = gimple_phi_arg_location_from_edge (phi, succ);
+ tree block = gimple_phi_arg_block_from_edge (phi, succ);
if (TREE_CODE (def) == SSA_NAME)
{
@@ -891,12 +894,13 @@ remove_forwarder_block_with_phi (basic_block bb)
{
def = new_arg;
locus = redirect_edge_var_map_location (vm);
+ block = redirect_edge_var_map_block (vm);
break;
}
}
}
- add_phi_arg (phi, def, s, locus);
+ add_phi_arg (phi, def, s, locus, block);
}
redirect_edge_var_map_clear (e);