diff options
author | dehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-16 11:08:21 +0000 |
---|---|---|
committer | dehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-16 11:08:21 +0000 |
commit | 60d535d287861820ad7e9b2e24c57732ef4dc591 (patch) | |
tree | 29b7c73df2749617967334fe587c1c7d74aa5314 | |
parent | cf88384257ed82cfdfd4e0e6959399691fd2c286 (diff) | |
download | gcc-60d535d287861820ad7e9b2e24c57732ef4dc591.tar.gz |
2012-07-16 Dehao Chen <dehao@google.com>
Revert
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189518 138bc75d-0d04-0410-961f-82ee72b054a4
38 files changed, 221 insertions, 319 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2decc3d7f13..0bae7affffb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,102 @@ +2012-07-16 Dehao Chen <dehao@google.com> + + Revert + 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. + 2012-07-16 Sergey Melnikov <sergey.melnikov@intel.com> * config/i386/i386.md (stack_protect_set): Disable the pattern diff --git a/gcc/gimple-streamer-in.c b/gcc/gimple-streamer-in.c index 42ea7cf9fd3..1b6bf4bd6d7 100644 --- a/gcc/gimple-streamer-in.c +++ b/gcc/gimple-streamer-in.c @@ -67,7 +67,7 @@ input_phi (struct lto_input_block *ib, basic_block bb, struct data_in *data_in, break; } - add_phi_arg (result, def, e, arg_loc, NULL); + add_phi_arg (result, def, e, arg_loc); } return result; diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 89cd00da965..cfa06ab60c5 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -1331,7 +1331,7 @@ canonicalize_loop_closed_ssa (loop_p loop) gimple_phi_result_ptr (close_phi)); add_phi_arg (close_phi, arg, gimple_phi_arg_edge (close_phi, 0), - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); use_p = gimple_phi_arg_imm_use_ptr (phi, i); replace_exp (use_p, res); update_stmt (phi); diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index 0595ab11d6a..1997f62538b 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1286,8 +1286,7 @@ split_function (struct split_point *split_point) /* When there is PHI, just update its value. */ if (TREE_CODE (retval) == SSA_NAME && !gsi_end_p (psi)) - add_phi_arg (gsi_stmt (psi), retval, e, UNKNOWN_LOCATION, - NULL); + add_phi_arg (gsi_stmt (psi), retval, e, UNKNOWN_LOCATION); /* Otherwise update the return BB itself. find_return_bb allows at most one assignment to return value, so update first statement. */ diff --git a/gcc/omp-low.c b/gcc/omp-low.c index ff7c10e1fbf..d51715e2843 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -3061,8 +3061,8 @@ expand_parallel_call (struct omp_region *region, basic_block bb, { gimple phi = create_phi_node (tmp_join, bb); SSA_NAME_DEF_STMT (tmp_join) = phi; - add_phi_arg (phi, tmp_then, e_then, UNKNOWN_LOCATION, NULL); - add_phi_arg (phi, tmp_else, e_else, UNKNOWN_LOCATION, NULL); + add_phi_arg (phi, tmp_then, e_then, UNKNOWN_LOCATION); + add_phi_arg (phi, tmp_else, e_else, UNKNOWN_LOCATION); } val = tmp_join; @@ -4597,7 +4597,6 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd) { gimple nphi; source_location locus; - tree block; phi = gsi_stmt (psi); t = gimple_phi_result (phi); @@ -4607,16 +4606,14 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd) t = PHI_ARG_DEF_FROM_EDGE (phi, se); locus = gimple_phi_arg_location_from_edge (phi, se); - block = gimple_phi_arg_block_from_edge (phi, se); /* A special case -- fd->loop.v is not yet computed in iter_part_bb, we need to use v_extra instead. */ if (t == fd->loop.v) t = v_extra; - add_phi_arg (nphi, t, ene, locus, block); + add_phi_arg (nphi, t, ene, locus); locus = redirect_edge_var_map_location (vm); - block = redirect_edge_var_map_block (vm); - add_phi_arg (nphi, redirect_edge_var_map_def (vm), re, locus, block); + add_phi_arg (nphi, redirect_edge_var_map_def (vm), re, locus); } gcc_assert (!gsi_end_p (psi) && i == VEC_length (edge_var_map, head)); redirect_edge_var_map_clear (re); @@ -4632,9 +4629,9 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd) phi = create_phi_node (trip_main, iter_part_bb); SSA_NAME_DEF_STMT (trip_main) = phi; add_phi_arg (phi, trip_back, single_succ_edge (trip_update_bb), - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); add_phi_arg (phi, trip_init, single_succ_edge (entry_bb), - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); } set_immediate_dominator (CDI_DOMINATORS, trip_update_bb, cont_bb); diff --git a/gcc/sese.c b/gcc/sese.c index dbfa8ed75b7..03b9f3d62aa 100644 --- a/gcc/sese.c +++ b/gcc/sese.c @@ -349,8 +349,8 @@ sese_add_exit_phis_edge (basic_block exit, tree use, edge false_e, edge true_e) create_new_def_for (gimple_phi_result (phi), phi, gimple_phi_result_ptr (phi)); - add_phi_arg (phi, use, false_e, UNKNOWN_LOCATION, NULL); - add_phi_arg (phi, use, true_e, UNKNOWN_LOCATION, NULL); + add_phi_arg (phi, use, false_e, UNKNOWN_LOCATION); + add_phi_arg (phi, use, true_e, UNKNOWN_LOCATION); } /* Insert in the block BB phi nodes for variables defined in REGION diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 45f45317a02..239baafb818 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2012-07-16 Dehao Chen <dehao@google.com> + + Revert + 2012-07-10 Dehao Chen <dehao@google.com> + + * gcc.dg/debug_info_inline.c: New test. + 2012-07-16 Janus Weil <janus@gcc.gnu.org> PR fortran/53956 diff --git a/gcc/testsuite/gcc.dg/debug_info_inline.c b/gcc/testsuite/gcc.dg/debug_info_inline.c deleted file mode 100644 index a9152615c73..00000000000 --- a/gcc/testsuite/gcc.dg/debug_info_inline.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -g" } */ - -int g, a; - -static int foo () -{ - int ret = a; - - if (g > -10) - return 10; - - return ret; -} - -int bar() -{ - if (foo()) - return 0; - else - return 1; -} - -/* { dg-final { scan-assembler "loc 1 19 0\n.*\n.LBB" } } */ diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index d8a396f90ea..decd1d6dffc 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2553,8 +2553,7 @@ reinstall_phi_args (edge new_edge, edge old_edge) gcc_assert (result == gimple_phi_result (phi)); - add_phi_arg (phi, arg, new_edge, redirect_edge_var_map_location (vm), - redirect_edge_var_map_block (vm)); + add_phi_arg (phi, arg, new_edge, redirect_edge_var_map_location (vm)); } redirect_edge_var_map_clear (old_edge); @@ -5016,7 +5015,7 @@ gimple_make_forwarder_block (edge fallthru) SSA_NAME_DEF_STMT (var) = new_phi; gimple_phi_set_result (phi, make_ssa_name (SSA_NAME_VAR (var), phi)); add_phi_arg (new_phi, gimple_phi_result (phi), fallthru, - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); } /* Add the arguments we have stored on edges. */ @@ -5477,8 +5476,7 @@ add_phi_args_after_copy_edge (edge e_copy) phi_copy = gsi_stmt (psi_copy); def = PHI_ARG_DEF_FROM_EDGE (phi, e); add_phi_arg (phi_copy, def, e_copy, - gimple_phi_arg_location_from_edge (phi, e), - gimple_phi_arg_block_from_edge (phi, e)); + gimple_phi_arg_location_from_edge (phi, e)); } } @@ -5853,8 +5851,7 @@ gimple_duplicate_sese_tail (edge entry ATTRIBUTE_UNUSED, edge exit ATTRIBUTE_UNU { phi = gsi_stmt (psi); def = PHI_ARG_DEF (phi, nexits[0]->dest_idx); - add_phi_arg (phi, def, e, gimple_phi_arg_location_from_edge (phi, e), - gimple_phi_arg_block_from_edge (phi, e)); + add_phi_arg (phi, def, e, gimple_phi_arg_location_from_edge (phi, e)); } } e = redirect_edge_and_branch (nexits[1], nexits[0]->dest); @@ -7427,8 +7424,7 @@ gimple_lv_adjust_loop_header_phi (basic_block first, basic_block second, phi1 = gsi_stmt (psi1); phi2 = gsi_stmt (psi2); def = PHI_ARG_DEF (phi2, e2->dest_idx); - add_phi_arg (phi1, def, e, gimple_phi_arg_location_from_edge (phi2, e2), - gimple_phi_arg_block_from_edge (phi2, e2)); + add_phi_arg (phi1, def, e, gimple_phi_arg_location_from_edge (phi2, e2)); } } diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index a5fbd756b26..78583c47e1b 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -444,9 +444,7 @@ remove_forwarder_block (basic_block bb) { gimple phi = gsi_stmt (gsi); source_location l = gimple_phi_arg_location_from_edge (phi, succ); - 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); + add_phi_arg (phi, gimple_phi_arg_def (phi, succ->dest_idx), s, l); } } } @@ -873,7 +871,6 @@ 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) { @@ -894,13 +891,12 @@ 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, block); + add_phi_arg (phi, def, s, locus); } redirect_edge_var_map_clear (e); diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 246b34c47ca..3b35ca42862 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -3853,15 +3853,13 @@ cleanup_empty_eh_merge_phis (basic_block new_bb, basic_block old_bb, FOR_EACH_EDGE (e, ei, old_bb->preds) { location_t oloc; - tree oblock; tree oop; if ((e->flags & EDGE_EH) == 0) continue; oop = gimple_phi_arg_def (ophi, e->dest_idx); oloc = gimple_phi_arg_location (ophi, e->dest_idx); - oblock = gimple_phi_arg_block (ophi, e->dest_idx); - redirect_edge_var_map_add (e, nresult, oop, oloc, oblock); + redirect_edge_var_map_add (e, nresult, oop, oloc); } } /* If we didn't find the PHI, but it's a VOP, remember to rename @@ -3876,9 +3874,8 @@ cleanup_empty_eh_merge_phis (basic_block new_bb, basic_block old_bb, { location_t nloc = gimple_phi_arg_location (nphi, old_bb_out->dest_idx); - tree nblock = gimple_phi_arg_block (nphi, old_bb_out->dest_idx); FOR_EACH_EDGE (e, ei, old_bb->preds) - redirect_edge_var_map_add (e, nresult, nop, nloc, nblock); + redirect_edge_var_map_add (e, nresult, nop, nloc); } } diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 3e9ecfcd521..748a97c236e 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -483,22 +483,6 @@ gimple_phi_arg_location_from_edge (gimple gs, edge e) return gimple_phi_arg (gs, e->dest_idx)->locus; } -/* Return the block location of gimple argument I of phi node GS. */ - -static inline tree -gimple_phi_arg_block (gimple gs, size_t i) -{ - return gimple_phi_arg (gs, i)->block; -} - -/* Return the block location of the argument on edge E of phi node GS. */ - -static inline tree -gimple_phi_arg_block_from_edge (gimple gs, edge e) -{ - return gimple_phi_arg (gs, e->dest_idx)->block; -} - /* Set the source location of gimple argument I of phi node GS to LOC. */ static inline void @@ -507,14 +491,6 @@ gimple_phi_arg_set_location (gimple gs, size_t i, source_location loc) gimple_phi_arg (gs, i)->locus = loc; } -/* Set the block location of gimple argument I of phi node GS to BLOCK. */ - -static inline void -gimple_phi_arg_set_block (gimple gs, size_t i, tree block) -{ - gimple_phi_arg (gs, i)->block = block; -} - /* Return TRUE if argument I of phi node GS has a location record. */ static inline bool @@ -523,13 +499,6 @@ gimple_phi_arg_has_location (gimple gs, size_t i) return gimple_phi_arg_location (gs, i) != UNKNOWN_LOCATION; } -/* Return TRUE if argument I of phi node GS has a location record. */ - -static inline bool -gimple_phi_arg_has_block (gimple gs, size_t i) -{ - return gimple_phi_arg_block (gs, i) != NULL; -} /* Return the PHI nodes for basic block BB, or NULL if there are no PHI nodes. */ @@ -1248,13 +1217,6 @@ redirect_edge_var_map_location (edge_var_map *v) return v->locus; } -/* Given an edge_var_map V, return the PHI arg location. */ - -static inline tree -redirect_edge_var_map_block (edge_var_map *v) -{ - return v->block; -} /* Return an SSA_NAME node for variable VAR defined in statement STMT in function cfun. */ diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index 3bcb6f5ccb8..8f7d336037e 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -507,7 +507,7 @@ extern void find_referenced_vars_in (gimple); extern void reserve_phi_args_for_new_edge (basic_block); extern void add_phi_node_to_bb (gimple phi, basic_block bb); extern gimple create_phi_node (tree, basic_block); -extern void add_phi_arg (gimple, tree, edge, source_location, tree); +extern void add_phi_arg (gimple, tree, edge, source_location); extern void remove_phi_args (edge); extern void remove_phi_node (gimple_stmt_iterator *, bool); extern void remove_phi_nodes (basic_block); @@ -531,7 +531,6 @@ struct _edge_var_map { tree result; /* PHI result. */ tree def; /* PHI arg definition. */ source_location locus; /* PHI arg location. */ - tree block; /* PHI arg block. */ }; typedef struct _edge_var_map edge_var_map; @@ -542,7 +541,7 @@ DEF_VEC_ALLOC_O(edge_var_map, heap); typedef VEC(edge_var_map, heap) *edge_var_map_vector; extern void init_tree_ssa (struct function *); -extern void redirect_edge_var_map_add (edge, tree, tree, source_location, tree); +extern void redirect_edge_var_map_add (edge, tree, tree, source_location); extern void redirect_edge_var_map_clear (edge); extern void redirect_edge_var_map_dup (edge, edge); extern edge_var_map_vector redirect_edge_var_map_vector (edge); diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index f576ee5f168..061f4c5a997 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2019,7 +2019,6 @@ copy_phis_for_bb (basic_block bb, copy_body_data *id) tree arg; tree new_arg; tree block = id->block; - tree arg_block, *n; edge_iterator ei2; /* When doing partial cloning, we allow PHIs on the entry block @@ -2047,15 +2046,8 @@ copy_phis_for_bb (basic_block bb, copy_body_data *id) gsi_insert_seq_on_edge (new_edge, stmts); inserted = true; } - n = (tree *) pointer_map_contains (id->decl_map, - gimple_phi_arg_block_from_edge (phi, old_edge)); - if (n) - arg_block = *n; - else - arg_block = NULL; add_phi_arg (new_phi, new_arg, new_edge, - gimple_phi_arg_location_from_edge (phi, old_edge), - arg_block); + gimple_phi_arg_location_from_edge (phi, old_edge)); } } } diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c index b9e52c856ff..102b699c500 100644 --- a/gcc/tree-into-ssa.c +++ b/gcc/tree-into-ssa.c @@ -1119,7 +1119,7 @@ insert_phi_nodes_for (tree var, bitmap phi_insertion_points, bool update_p) renamer will use the symbol on the LHS to get its reaching definition. */ FOR_EACH_EDGE (e, ei, bb->preds) - add_phi_arg (phi, var, e, UNKNOWN_LOCATION, NULL); + add_phi_arg (phi, var, e, UNKNOWN_LOCATION); } else { @@ -1474,8 +1474,7 @@ rewrite_add_phi_arguments (basic_block bb) phi = gsi_stmt (gsi); currdef = get_reaching_def (SSA_NAME_VAR (gimple_phi_result (phi))); stmt = SSA_NAME_DEF_STMT (currdef); - add_phi_arg (phi, currdef, e, gimple_location (stmt), - gimple_block (stmt)); + add_phi_arg (phi, currdef, e, gimple_location (stmt)); } } } diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 459b1e2cb1f..58ed12b1e69 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -171,7 +171,6 @@ update_phis_for_loop_copy (struct loop *orig_loop, struct loop *new_loop) { tree def; source_location locus; - tree block; gimple phi_new = gsi_stmt (si_new); gimple phi_orig = gsi_stmt (si_orig); @@ -179,14 +178,12 @@ update_phis_for_loop_copy (struct loop *orig_loop, struct loop *new_loop) associated with the entry of NEW_LOOP) */ def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_entry_e); locus = gimple_phi_arg_location_from_edge (phi_orig, orig_entry_e); - block = gimple_phi_arg_block_from_edge (phi_orig, orig_entry_e); - add_phi_arg (phi_new, def, new_loop_entry_e, locus, block); + add_phi_arg (phi_new, def, new_loop_entry_e, locus); /* Add the second phi argument for the phi in NEW_LOOP (the one associated with the latch of NEW_LOOP) */ def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_loop_latch); locus = gimple_phi_arg_location_from_edge (phi_orig, orig_loop_latch); - block = gimple_phi_arg_block_from_edge (phi_orig, orig_loop_latch); if (TREE_CODE (def) == SSA_NAME) { @@ -201,8 +198,7 @@ update_phis_for_loop_copy (struct loop *orig_loop, struct loop *new_loop) /* Could be an integer. */ new_ssa_name = def; - add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop), locus, - block); + add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop), locus); } } diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index 96d2ecd4e12..f52b2603012 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -78,9 +78,6 @@ typedef struct _elim_graph { /* Source locus on each edge */ VEC(source_location,heap) *edge_locus; - /* Block location on each edge. */ - VEC(tree,heap) *edge_block; - /* Visited vector. */ sbitmap visited; @@ -99,9 +96,6 @@ typedef struct _elim_graph { /* Source locations for any constant copies. */ VEC(source_location,heap) *copy_locus; - - /* Block locations for any constant copies. */ - VEC(tree,heap) *copy_block; } *elim_graph; @@ -180,8 +174,7 @@ emit_partition_copy (rtx dest, rtx src, int unsignedsrcp, tree sizeexp) /* Insert a copy instruction from partition SRC to DEST onto edge E. */ static void -insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus, - tree block) +insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus) { tree var; rtx seq; @@ -201,10 +194,7 @@ insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus, set_location_for_edge (e); /* If a locus is provided, override the default. */ if (locus) - { - set_curr_insn_source_location (locus); - set_curr_insn_block (block); - } + set_curr_insn_source_location (locus); var = partition_to_var (SA.map, src); seq = emit_partition_copy (SA.partition_to_pseudo[dest], @@ -219,8 +209,7 @@ insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus, onto edge E. */ static void -insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus, - tree block) +insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus) { rtx seq, x; enum machine_mode dest_mode, src_mode; @@ -242,10 +231,7 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus, set_location_for_edge (e); /* If a locus is provided, override the default. */ if (locus) - { - set_curr_insn_source_location (locus); - set_curr_insn_block (block); - } + set_curr_insn_source_location (locus); start_sequence (); @@ -283,7 +269,7 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus, static void insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp, - source_location locus, tree block) + source_location locus) { rtx seq; if (dump_file && (dump_flags & TDF_DETAILS)) @@ -301,10 +287,7 @@ insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp, set_location_for_edge (e); /* If a locus is provided, override the default. */ if (locus) - { - set_curr_insn_source_location (locus); - set_curr_insn_block (block); - } + set_curr_insn_source_location (locus); /* We give the destination as sizeexp in case src/dest are BLKmode mems. Usually we give the source. As we result from SSA names @@ -321,8 +304,7 @@ insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp, onto edge E. */ static void -insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus, - tree block) +insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus) { tree var; rtx seq; @@ -341,10 +323,7 @@ insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus, set_location_for_edge (e); /* If a locus is provided, override the default. */ if (locus) - { - set_curr_insn_source_location (locus); - set_curr_insn_block (block); - } + set_curr_insn_source_location (locus); var = partition_to_var (SA.map, src); seq = emit_partition_copy (dest, @@ -368,10 +347,8 @@ new_elim_graph (int size) g->const_dests = VEC_alloc (int, heap, 20); g->const_copies = VEC_alloc (tree, heap, 20); g->copy_locus = VEC_alloc (source_location, heap, 10); - g->copy_block = VEC_alloc (tree, heap, 10); g->edge_list = VEC_alloc (int, heap, 20); g->edge_locus = VEC_alloc (source_location, heap, 10); - g->edge_block = VEC_alloc (tree, heap, 10); g->stack = VEC_alloc (int, heap, 30); g->visited = sbitmap_alloc (size); @@ -388,7 +365,6 @@ clear_elim_graph (elim_graph g) VEC_truncate (int, g->nodes, 0); VEC_truncate (int, g->edge_list, 0); VEC_truncate (source_location, g->edge_locus, 0); - VEC_truncate (tree, g->edge_block, 0); } @@ -404,9 +380,7 @@ delete_elim_graph (elim_graph g) VEC_free (int, heap, g->const_dests); VEC_free (int, heap, g->nodes); VEC_free (source_location, heap, g->copy_locus); - VEC_free (tree, heap, g->copy_block); VEC_free (source_location, heap, g->edge_locus); - VEC_free (tree, heap, g->edge_block); free (g); } @@ -439,13 +413,11 @@ elim_graph_add_node (elim_graph g, int node) /* Add the edge PRED->SUCC to graph G. */ static inline void -elim_graph_add_edge (elim_graph g, int pred, int succ, source_location locus, - tree block) +elim_graph_add_edge (elim_graph g, int pred, int succ, source_location locus) { VEC_safe_push (int, heap, g->edge_list, pred); VEC_safe_push (int, heap, g->edge_list, succ); VEC_safe_push (source_location, heap, g->edge_locus, locus); - VEC_safe_push (tree, heap, g->edge_block, block); } @@ -453,8 +425,7 @@ elim_graph_add_edge (elim_graph g, int pred, int succ, source_location locus, return the successor node. -1 is returned if there is no such edge. */ static inline int -elim_graph_remove_succ_edge (elim_graph g, int node, source_location *locus, - tree *block) +elim_graph_remove_succ_edge (elim_graph g, int node, source_location *locus) { int y; unsigned x; @@ -466,12 +437,9 @@ elim_graph_remove_succ_edge (elim_graph g, int node, source_location *locus, VEC_replace (int, g->edge_list, x + 1, -1); *locus = VEC_index (source_location, g->edge_locus, x / 2); VEC_replace (source_location, g->edge_locus, x / 2, UNKNOWN_LOCATION); - *block = VEC_index (tree, g->edge_block, x / 2); - VEC_replace (tree, g->edge_block, x / 2, NULL); return y; } *locus = UNKNOWN_LOCATION; - *block = NULL; return -1; } @@ -480,7 +448,7 @@ elim_graph_remove_succ_edge (elim_graph g, int node, source_location *locus, edge list. VAR will hold the partition number found. CODE is the code fragment executed for every node found. */ -#define FOR_EACH_ELIM_GRAPH_SUCC(GRAPH, NODE, VAR, LOCUS, BLOCK, CODE) \ +#define FOR_EACH_ELIM_GRAPH_SUCC(GRAPH, NODE, VAR, LOCUS, CODE) \ do { \ unsigned x_; \ int y_; \ @@ -492,8 +460,6 @@ do { \ (void) ((VAR) = VEC_index (int, (GRAPH)->edge_list, x_ + 1)); \ (void) ((LOCUS) = VEC_index (source_location, \ (GRAPH)->edge_locus, x_ / 2)); \ - (void) ((BLOCK) = VEC_index (tree, \ - (GRAPH)->edge_block, x_ / 2)); \ CODE; \ } \ } while (0) @@ -503,7 +469,7 @@ do { \ GRAPH. VAR will hold the partition number found. CODE is the code fragment executed for every node found. */ -#define FOR_EACH_ELIM_GRAPH_PRED(GRAPH, NODE, VAR, LOCUS, BLOCK, CODE) \ +#define FOR_EACH_ELIM_GRAPH_PRED(GRAPH, NODE, VAR, LOCUS, CODE) \ do { \ unsigned x_; \ int y_; \ @@ -515,8 +481,6 @@ do { \ (void) ((VAR) = VEC_index (int, (GRAPH)->edge_list, x_)); \ (void) ((LOCUS) = VEC_index (source_location, \ (GRAPH)->edge_locus, x_ / 2)); \ - (void) ((BLOCK) = VEC_index (tree, \ - (GRAPH)->edge_block, x_ / 2)); \ CODE; \ } \ } while (0) @@ -547,7 +511,6 @@ eliminate_build (elim_graph g) { gimple phi = gsi_stmt (gsi); source_location locus; - tree block; p0 = var_to_partition (g->map, gimple_phi_result (phi)); /* Ignore results which are not in partitions. */ @@ -556,7 +519,6 @@ eliminate_build (elim_graph g) Ti = PHI_ARG_DEF (phi, g->e->dest_idx); locus = gimple_phi_arg_location_from_edge (phi, g->e); - block = gimple_phi_arg_block_from_edge (phi, g->e); /* If this argument is a constant, or a SSA_NAME which is being left in SSA form, just queue a copy to be emitted on this @@ -570,7 +532,6 @@ eliminate_build (elim_graph g) VEC_safe_push (int, heap, g->const_dests, p0); VEC_safe_push (tree, heap, g->const_copies, Ti); VEC_safe_push (source_location, heap, g->copy_locus, locus); - VEC_safe_push (tree, heap, g->copy_block, block); } else { @@ -579,7 +540,7 @@ eliminate_build (elim_graph g) { eliminate_name (g, p0); eliminate_name (g, pi); - elim_graph_add_edge (g, p0, pi, locus, block); + elim_graph_add_edge (g, p0, pi, locus); } } } @@ -593,10 +554,9 @@ elim_forward (elim_graph g, int T) { int S; source_location locus; - tree block; SET_BIT (g->visited, T); - FOR_EACH_ELIM_GRAPH_SUCC (g, T, S, locus, block, + FOR_EACH_ELIM_GRAPH_SUCC (g, T, S, locus, { if (!TEST_BIT (g->visited, S)) elim_forward (g, S); @@ -612,9 +572,8 @@ elim_unvisited_predecessor (elim_graph g, int T) { int P; source_location locus; - tree block; - FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus, block, + FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus, { if (!TEST_BIT (g->visited, P)) return 1; @@ -629,15 +588,14 @@ elim_backward (elim_graph g, int T) { int P; source_location locus; - tree block; SET_BIT (g->visited, T); - FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus, block, + FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus, { if (!TEST_BIT (g->visited, P)) { elim_backward (g, P); - insert_partition_copy_on_edge (g->e, P, T, locus, block); + insert_partition_copy_on_edge (g->e, P, T, locus); } }); } @@ -666,7 +624,6 @@ elim_create (elim_graph g, int T) { int P, S; source_location locus; - tree block; if (elim_unvisited_predecessor (g, T)) { @@ -674,24 +631,23 @@ elim_create (elim_graph g, int T) rtx U = get_temp_reg (var); int unsignedsrcp = TYPE_UNSIGNED (TREE_TYPE (var)); - insert_part_to_rtx_on_edge (g->e, U, T, UNKNOWN_LOCATION, NULL); - FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus, block, + insert_part_to_rtx_on_edge (g->e, U, T, UNKNOWN_LOCATION); + FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus, { if (!TEST_BIT (g->visited, P)) { elim_backward (g, P); - insert_rtx_to_part_on_edge (g->e, P, U, unsignedsrcp, locus, - block); + insert_rtx_to_part_on_edge (g->e, P, U, unsignedsrcp, locus); } }); } else { - S = elim_graph_remove_succ_edge (g, T, &locus, &block); + S = elim_graph_remove_succ_edge (g, T, &locus); if (S != -1) { SET_BIT (g->visited, T); - insert_partition_copy_on_edge (g->e, T, S, locus, block); + insert_partition_copy_on_edge (g->e, T, S, locus); } } } @@ -706,7 +662,6 @@ eliminate_phi (edge e, elim_graph g) gcc_assert (VEC_length (tree, g->const_copies) == 0); gcc_assert (VEC_length (source_location, g->copy_locus) == 0); - gcc_assert (VEC_length (tree, g->copy_block) == 0); /* Abnormal edges already have everything coalesced. */ if (e->flags & EDGE_ABNORMAL) @@ -744,13 +699,11 @@ eliminate_phi (edge e, elim_graph g) int dest; tree src; source_location locus; - tree block; src = VEC_pop (tree, g->const_copies); dest = VEC_pop (int, g->const_dests); locus = VEC_pop (source_location, g->copy_locus); - block = VEC_pop (tree, g->copy_block); - insert_value_copy_on_edge (e, dest, src, locus, block); + insert_value_copy_on_edge (e, dest, src, locus); } } @@ -1135,12 +1088,8 @@ insert_backedge_copies (void) /* copy location if present. */ if (gimple_phi_arg_has_location (phi, i)) - { - gimple_set_location (stmt, - gimple_phi_arg_location (phi, i)); - gimple_set_block (stmt, - gimple_phi_arg_block (phi, i)); - } + gimple_set_location (stmt, + gimple_phi_arg_location (phi, i)); /* Insert the new statement into the block and update the PHI node. */ diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index 0dd163275c8..86036b42639 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -998,7 +998,6 @@ create_phi_for_local_result (void **slot, void *data) basic_block store_bb; tree local_res; source_location locus; - tree block; /* STORE_BB is the block where the phi should be stored. It is the destination of the loop exit. @@ -1018,12 +1017,11 @@ create_phi_for_local_result (void **slot, void *data) = make_ssa_name (SSA_NAME_VAR (gimple_assign_lhs (reduc->reduc_stmt)), NULL); locus = gimple_location (reduc->reduc_stmt); - block = gimple_block (reduc->reduc_stmt); new_phi = create_phi_node (local_res, store_bb); SSA_NAME_DEF_STMT (local_res) = new_phi; - add_phi_arg (new_phi, reduc->init, e, locus, block); + add_phi_arg (new_phi, reduc->init, e, locus); add_phi_arg (new_phi, gimple_assign_lhs (reduc->reduc_stmt), - FALLTHRU_EDGE (loop->latch), locus, block); + FALLTHRU_EDGE (loop->latch), locus); reduc->new_phi = new_phi; return 1; @@ -1502,7 +1500,7 @@ transform_to_exit_first_loop (struct loop *loop, htab_t reduction_list, tree nit SET_PHI_RESULT (phi, t); nphi = create_phi_node (res, orig_header); SSA_NAME_DEF_STMT (res) = nphi; - add_phi_arg (nphi, t, hpred, UNKNOWN_LOCATION, NULL); + add_phi_arg (nphi, t, hpred, UNKNOWN_LOCATION); if (res == control) { @@ -1658,7 +1656,6 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data, for (gsi = gsi_start_phis (ex_bb); !gsi_end_p (gsi); gsi_next (&gsi)) { source_location locus; - tree block; tree def; phi = gsi_stmt (gsi); stmt = SSA_NAME_DEF_STMT (PHI_ARG_DEF_FROM_EDGE (phi, exit)); @@ -1666,14 +1663,11 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data, def = PHI_ARG_DEF_FROM_EDGE (stmt, loop_preheader_edge (loop)); locus = gimple_phi_arg_location_from_edge (stmt, loop_preheader_edge (loop)); - block = gimple_phi_arg_block_from_edge (stmt, - loop_preheader_edge (loop)); - add_phi_arg (phi, def, guard, locus, block); + add_phi_arg (phi, def, guard, locus); def = PHI_ARG_DEF_FROM_EDGE (stmt, loop_latch_edge (loop)); locus = gimple_phi_arg_location_from_edge (stmt, loop_latch_edge (loop)); - block = gimple_phi_arg_block_from_edge (stmt, loop_latch_edge (loop)); - add_phi_arg (phi, def, end, locus, block); + add_phi_arg (phi, def, end, locus); } e = redirect_edge_and_branch (exit, nexit->dest); PENDING_STMT (e) = NULL; diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c index e52af31bede..6408a525298 100644 --- a/gcc/tree-phinodes.c +++ b/gcc/tree-phinodes.c @@ -205,7 +205,6 @@ make_phi_node (tree var, int len) use_operand_p imm; gimple_phi_arg_set_location (phi, i, UNKNOWN_LOCATION); - gimple_phi_arg_set_block (phi, i ,NULL); imm = gimple_phi_arg_imm_use_ptr (phi, i); imm->use = gimple_phi_arg_def_ptr (phi, i); imm->prev = NULL; @@ -276,7 +275,6 @@ resize_phi_node (gimple phi, size_t len) use_operand_p imm; gimple_phi_arg_set_location (new_phi, i, UNKNOWN_LOCATION); - gimple_phi_arg_set_block (new_phi, i, NULL); imm = gimple_phi_arg_imm_use_ptr (new_phi, i); imm->use = gimple_phi_arg_def_ptr (new_phi, i); imm->prev = NULL; @@ -364,7 +362,7 @@ create_phi_node (tree var, basic_block bb) PHI points to the reallocated phi node when we return. */ void -add_phi_arg (gimple phi, tree def, edge e, source_location locus, tree block) +add_phi_arg (gimple phi, tree def, edge e, source_location locus) { basic_block bb = e->dest; @@ -388,7 +386,6 @@ add_phi_arg (gimple phi, tree def, edge e, source_location locus, tree block) SET_PHI_ARG_DEF (phi, e->dest_idx, def); gimple_phi_arg_set_location (phi, e->dest_idx, locus); - gimple_phi_arg_set_block (phi, e->dest_idx, block); } @@ -420,8 +417,6 @@ remove_phi_arg_num (gimple phi, int i) /* Move the location as well. */ gimple_phi_arg_set_location (phi, i, gimple_phi_arg_location (phi, num_elem - 1)); - gimple_phi_arg_set_block (phi, i, - gimple_phi_arg_block (phi, num_elem - 1)); } /* Shrink the vector and return. Note that we do not have to clear diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index 42d2a29ba6f..310fe3bd1d7 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -1531,8 +1531,8 @@ initialize_root_vars (struct loop *loop, chain_p chain, bitmap tmp_vars) phi = create_phi_node (var, loop->header); SSA_NAME_DEF_STMT (var) = phi; - add_phi_arg (phi, init, entry, UNKNOWN_LOCATION, NULL); - add_phi_arg (phi, next, latch, UNKNOWN_LOCATION, NULL); + add_phi_arg (phi, init, entry, UNKNOWN_LOCATION); + add_phi_arg (phi, next, latch, UNKNOWN_LOCATION); } } @@ -1595,8 +1595,8 @@ initialize_root_vars_lm (struct loop *loop, dref root, bool written, next = VEC_index (tree, *vars, 1); phi = create_phi_node (var, loop->header); SSA_NAME_DEF_STMT (var) = phi; - add_phi_arg (phi, init, entry, UNKNOWN_LOCATION, NULL); - add_phi_arg (phi, next, latch, UNKNOWN_LOCATION, NULL); + add_phi_arg (phi, init, entry, UNKNOWN_LOCATION); + add_phi_arg (phi, next, latch, UNKNOWN_LOCATION); } else { diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 42888b4f90d..8763cfb28d2 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -1129,7 +1129,6 @@ forward_edge_to_pdom (edge e, basic_block post_dom_bb) gimple phi = gsi_stmt (gsi); tree op; source_location locus; - tree block; /* PHIs for virtuals have no control dependency relation on them. We are lost here and must force renaming of the symbol. */ @@ -1149,8 +1148,7 @@ forward_edge_to_pdom (edge e, basic_block post_dom_bb) op = gimple_phi_arg_def (phi, e2->dest_idx); locus = gimple_phi_arg_location (phi, e2->dest_idx); - block = gimple_phi_arg_block (phi, e2->dest_idx); - add_phi_arg (phi, op, e, locus, block); + add_phi_arg (phi, op, e, locus); /* The resulting PHI if not dead can only be degenerate. */ gcc_assert (degenerate_phi_p (phi)); gsi_next (&gsi); diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index e0f9d9cb536..8f504f005fe 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -765,10 +765,6 @@ remove_unused_locals (void) FOR_EACH_PHI_ARG (arg_p, phi, i, SSA_OP_ALL_USES) { tree arg = USE_FROM_PTR (arg_p); - int index = PHI_ARG_INDEX_FROM_USE (arg_p); - tree block = gimple_phi_arg_block (phi, index); - if (block != NULL) - TREE_USED (block) = true; mark_all_vars_used (&arg, global_unused_vars); } } diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 6433cc2681b..290cb7400a1 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -2086,7 +2086,7 @@ execute_sm_if_changed (edge ex, tree mem, tree tmp_var, tree flag) if (gimple_phi_arg_edge (phi, i)->src == new_bb) { tree arg = gimple_phi_arg_def (phi, i); - add_phi_arg (phi, arg, then_old_edge, UNKNOWN_LOCATION, NULL); + add_phi_arg (phi, arg, then_old_edge, UNKNOWN_LOCATION); update_stmt (phi); } } diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 7d3cc2aa743..e2e76058251 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -121,9 +121,8 @@ create_iv (tree base, tree step, tree var, struct loop *loop, stmt = create_phi_node (vb, loop->header); SSA_NAME_DEF_STMT (vb) = stmt; - add_phi_arg (stmt, initial, loop_preheader_edge (loop), UNKNOWN_LOCATION, - NULL); - add_phi_arg (stmt, va, loop_latch_edge (loop), UNKNOWN_LOCATION, NULL); + add_phi_arg (stmt, initial, loop_preheader_edge (loop), UNKNOWN_LOCATION); + add_phi_arg (stmt, va, loop_latch_edge (loop), UNKNOWN_LOCATION); } /* Add exit phis for the USE on EXIT. */ @@ -153,7 +152,7 @@ add_exit_phis_edge (basic_block exit, tree use) create_new_def_for (gimple_phi_result (phi), phi, gimple_phi_result_ptr (phi)); FOR_EACH_EDGE (e, ei, exit->preds) - add_phi_arg (phi, use, e, UNKNOWN_LOCATION, NULL); + add_phi_arg (phi, use, e, UNKNOWN_LOCATION); } /* Add exit phis for VAR that is used in LIVEIN. @@ -486,14 +485,12 @@ split_loop_exit_edge (edge exit) use_operand_p op_p; gimple_stmt_iterator psi; source_location locus; - tree block; for (psi = gsi_start_phis (dest); !gsi_end_p (psi); gsi_next (&psi)) { phi = gsi_stmt (psi); op_p = PHI_ARG_DEF_PTR_FROM_EDGE (phi, single_succ_edge (bb)); locus = gimple_phi_arg_location_from_edge (phi, single_succ_edge (bb)); - block = gimple_phi_arg_block_from_edge (phi, single_succ_edge (bb)); name = USE_FROM_PTR (op_p); @@ -507,7 +504,7 @@ split_loop_exit_edge (edge exit) new_name = duplicate_ssa_name (name, NULL); new_phi = create_phi_node (new_name, bb); SSA_NAME_DEF_STMT (new_name) = new_phi; - add_phi_arg (new_phi, name, exit, locus, block); + add_phi_arg (new_phi, name, exit, locus); SET_USE (op_p, new_name); } @@ -1027,8 +1024,8 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor, phi_rest = create_phi_node (new_init, rest); SSA_NAME_DEF_STMT (new_init) = phi_rest; - add_phi_arg (phi_rest, init, precond_edge, UNKNOWN_LOCATION, NULL); - add_phi_arg (phi_rest, next, new_exit, UNKNOWN_LOCATION, NULL); + add_phi_arg (phi_rest, init, precond_edge, UNKNOWN_LOCATION); + add_phi_arg (phi_rest, next, new_exit, UNKNOWN_LOCATION); SET_USE (op, new_init); } diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 51a21c0dc78..46d8a2c4e60 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -1454,7 +1454,6 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb, gimple newphi, new_stmt; gimple_stmt_iterator gsi; source_location locus; - tree block; /* Check if middle_bb contains of only one store. */ if (!assign @@ -1462,7 +1461,6 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb, return false; locus = gimple_location (assign); - block = gimple_block (assign); lhs = gimple_assign_lhs (assign); rhs = gimple_assign_rhs1 (assign); if (TREE_CODE (lhs) != MEM_REF @@ -1496,15 +1494,14 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb, name = make_ssa_name (condstoretemp, new_stmt); gimple_assign_set_lhs (new_stmt, name); gimple_set_location (new_stmt, locus); - gimple_set_block (new_stmt, block); gsi_insert_on_edge (e1, new_stmt); /* 4) Create a PHI node at the join block, with one argument holding the old RHS, and the other holding the temporary where we stored the old memory contents. */ newphi = create_phi_node (condstoretemp, join_bb); - add_phi_arg (newphi, rhs, e0, locus, block); - add_phi_arg (newphi, name, e1, locus, block); + add_phi_arg (newphi, rhs, e0, locus); + add_phi_arg (newphi, name, e1, locus); lhs = unshare_expr (lhs); new_stmt = gimple_build_assign (lhs, PHI_RESULT (newphi)); @@ -1531,7 +1528,6 @@ cond_if_else_store_replacement_1 (basic_block then_bb, basic_block else_bb, { tree lhs_base, lhs, then_rhs, else_rhs; source_location then_locus, else_locus; - tree then_block, else_block; gimple_stmt_iterator gsi; gimple newphi, new_stmt; @@ -1557,8 +1553,6 @@ cond_if_else_store_replacement_1 (basic_block then_bb, basic_block else_bb, else_rhs = gimple_assign_rhs1 (else_assign); then_locus = gimple_location (then_assign); else_locus = gimple_location (else_assign); - then_block = gimple_block (then_assign); - else_block = gimple_block (else_assign); /* Now we've checked the constraints, so do the transformation: 1) Remove the stores. */ @@ -1582,10 +1576,8 @@ cond_if_else_store_replacement_1 (basic_block then_bb, basic_block else_bb, holding the old RHS, and the other holding the temporary where we stored the old memory contents. */ newphi = create_phi_node (condstoretemp, join_bb); - add_phi_arg (newphi, then_rhs, EDGE_SUCC (then_bb, 0), then_locus, - then_block); - add_phi_arg (newphi, else_rhs, EDGE_SUCC (else_bb, 0), else_locus, - else_block); + add_phi_arg (newphi, then_rhs, EDGE_SUCC (then_bb, 0), then_locus); + add_phi_arg (newphi, else_rhs, EDGE_SUCC (else_bb, 0), else_locus); new_stmt = gimple_build_assign (lhs, PHI_RESULT (newphi)); diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c index 2a52a27fb54..30644372564 100644 --- a/gcc/tree-ssa-phiprop.c +++ b/gcc/tree-ssa-phiprop.c @@ -159,11 +159,9 @@ phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt, tree old_arg, new_var; gimple tmp; source_location locus; - tree block; old_arg = PHI_ARG_DEF_FROM_EDGE (phi, e); locus = gimple_phi_arg_location_from_edge (phi, e); - block = gimple_phi_arg_block_from_edge (phi, e); while (TREE_CODE (old_arg) == SSA_NAME && (SSA_NAME_VERSION (old_arg) >= n || phivn[SSA_NAME_VERSION (old_arg)].value == NULL_TREE)) @@ -171,7 +169,6 @@ phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt, gimple def_stmt = SSA_NAME_DEF_STMT (old_arg); old_arg = gimple_assign_rhs1 (def_stmt); locus = gimple_location (def_stmt); - block = gimple_block (def_stmt); } if (TREE_CODE (old_arg) == SSA_NAME) @@ -206,7 +203,6 @@ phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt, new_var = make_ssa_name (new_var, tmp); gimple_assign_set_lhs (tmp, new_var); gimple_set_location (tmp, locus); - gimple_set_block (tmp, block); gsi_insert_on_edge (e, tmp); update_stmt (tmp); @@ -220,7 +216,7 @@ phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt, } } - add_phi_arg (new_phi, new_var, e, locus, block); + add_phi_arg (new_phi, new_var, e, locus); } update_stmt (new_phi); diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 940e6873cb7..9adf55d18cf 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -3403,10 +3403,10 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum, gcc_assert (get_expr_type (ae) == type || useless_type_conversion_p (type, get_expr_type (ae))); if (ae->kind == CONSTANT) - add_phi_arg (phi, PRE_EXPR_CONSTANT (ae), pred, UNKNOWN_LOCATION, NULL); + add_phi_arg (phi, PRE_EXPR_CONSTANT (ae), pred, UNKNOWN_LOCATION); else add_phi_arg (phi, PRE_EXPR_NAME (avail[pred->src->index]), pred, - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); } newphi = get_or_alloc_expr_for_name (gimple_phi_result (phi)); diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c index 72eab9dee86..9ec3b8a5091 100644 --- a/gcc/tree-ssa-tail-merge.c +++ b/gcc/tree-ssa-tail-merge.c @@ -1466,7 +1466,7 @@ replace_block_by (basic_block bb1, basic_block bb2) bb2_phi = vop_phi (bb2); add_phi_arg (bb2_phi, SSA_NAME_VAR (gimple_phi_result (bb2_phi)), - pred_edge, UNKNOWN_LOCATION, NULL); + pred_edge, UNKNOWN_LOCATION); } bb2->frequency += bb1->frequency; diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index a5e67e3362d..65be1b926a6 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -316,9 +316,7 @@ copy_phi_args (basic_block bb, edge src_e, edge tgt_e) { gimple phi = gsi_stmt (gsi); source_location locus = gimple_phi_arg_location (phi, src_indx); - tree block = gimple_phi_arg_block (phi, src_indx); - add_phi_arg (phi, gimple_phi_arg_def (phi, src_indx), tgt_e, locus, - block); + add_phi_arg (phi, gimple_phi_arg_def (phi, src_indx), tgt_e, locus); } } diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index f488ee4ee09..d545ffd21d2 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -51,8 +51,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, source_location locus, - tree block) +redirect_edge_var_map_add (edge e, tree result, tree def, source_location locus) { void **slot; edge_var_map_vector old_head, head; @@ -71,7 +70,6 @@ redirect_edge_var_map_add (edge e, tree result, tree def, source_location locus, new_node.def = def; new_node.result = result; new_node.locus = locus; - new_node.block = block; VEC_safe_push (edge_var_map, heap, head, &new_node); if (old_head != head) @@ -195,17 +193,15 @@ ssa_redirect_edge (edge e, basic_block dest) { tree def; source_location locus ; - tree block; phi = gsi_stmt (gsi); def = gimple_phi_arg_def (phi, e->dest_idx); locus = gimple_phi_arg_location (phi, e->dest_idx); - block = gimple_phi_arg_block (phi, e->dest_idx); if (def == NULL_TREE) continue; - redirect_edge_var_map_add (e, gimple_phi_result (phi), def, locus, block); + redirect_edge_var_map_add (e, gimple_phi_result (phi), def, locus); } e = redirect_edge_succ_nodup (e, dest); @@ -238,8 +234,7 @@ flush_pending_stmts (edge e) phi = gsi_stmt (gsi); def = redirect_edge_var_map_def (vm); - add_phi_arg (phi, def, e, redirect_edge_var_map_location (vm), - redirect_edge_var_map_block (vm)); + add_phi_arg (phi, def, e, redirect_edge_var_map_location (vm)); } redirect_edge_var_map_clear (e); diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c index b90d147e93c..80457989a47 100644 --- a/gcc/tree-switch-conversion.c +++ b/gcc/tree-switch-conversion.c @@ -1188,10 +1188,8 @@ fix_phi_nodes (edge e1f, edge e2f, basic_block bbf, !gsi_end_p (gsi); gsi_next (&gsi), i++) { gimple phi = gsi_stmt (gsi); - add_phi_arg (phi, info->target_inbound_names[i], e1f, UNKNOWN_LOCATION, - NULL); - add_phi_arg (phi, info->target_outbound_names[i], e2f, UNKNOWN_LOCATION, - NULL); + add_phi_arg (phi, info->target_inbound_names[i], e1f, UNKNOWN_LOCATION); + add_phi_arg (phi, info->target_outbound_names[i], e2f, UNKNOWN_LOCATION); } } diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 65025d9b685..02e1113f483 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -597,7 +597,7 @@ add_successor_phi_arg (edge e, tree var, tree phi_arg) break; gcc_assert (!gsi_end_p (gsi)); - add_phi_arg (gsi_stmt (gsi), phi_arg, e, UNKNOWN_LOCATION, NULL); + add_phi_arg (gsi_stmt (gsi), phi_arg, e, UNKNOWN_LOCATION); } /* Creates a GIMPLE statement which computes the operation specified by @@ -853,7 +853,7 @@ eliminate_tail_call (struct tailcall *t) phi = gsi_stmt (gsi); gcc_assert (param == SSA_NAME_VAR (PHI_RESULT (phi))); - add_phi_arg (phi, arg, e, gimple_location (stmt), gimple_block (stmt)); + add_phi_arg (phi, arg, e, gimple_location (stmt)); gsi_next (&gsi); } @@ -948,7 +948,7 @@ create_tailcall_accumulator (const char *label, basic_block bb, tree init) phi = create_phi_node (tmp, bb); /* RET_TYPE can be a float when -ffast-maths is enabled. */ add_phi_arg (phi, fold_convert (ret_type, init), single_pred_edge (bb), - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); return PHI_RESULT (phi); } @@ -1012,7 +1012,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls) phi = create_phi_node (name, first); SSA_NAME_DEF_STMT (name) = phi; add_phi_arg (phi, new_name, single_pred_edge (first), - EXPR_LOCATION (param), NULL); + EXPR_LOCATION (param)); } phis_constructed = true; } diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 6d64c7bb198..bfc983b878d 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -4433,7 +4433,7 @@ vect_setup_realignment (gimple stmt, gimple_stmt_iterator *gsi, msq = make_ssa_name (vec_dest, NULL); phi_stmt = create_phi_node (msq, containing_loop->header); SSA_NAME_DEF_STMT (msq) = phi_stmt; - add_phi_arg (phi_stmt, msq_init, pe, UNKNOWN_LOCATION, NULL); + add_phi_arg (phi_stmt, msq_init, pe, UNKNOWN_LOCATION); return msq; } diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 87afb6e15b1..9ac0d9a04eb 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -294,15 +294,13 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop, gsi_next (&gsi_new), gsi_next (&gsi_orig)) { source_location locus; - tree block; phi_new = gsi_stmt (gsi_new); phi_orig = gsi_stmt (gsi_orig); /* step 1. */ def = PHI_ARG_DEF_FROM_EDGE (phi_orig, entry_arg_e); locus = gimple_phi_arg_location_from_edge (phi_orig, entry_arg_e); - block = gimple_phi_arg_block_from_edge (phi_orig, entry_arg_e); - add_phi_arg (phi_new, def, new_loop_entry_e, locus, block); + add_phi_arg (phi_new, def, new_loop_entry_e, locus); /* step 2. */ def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_loop_latch); @@ -319,8 +317,7 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop, } /* An ordinary ssa name defined in the loop. */ - add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop), locus, - block); + add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop), locus); /* Drop any debug references outside the loop, if they would become ill-formed SSA. */ @@ -515,7 +512,6 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop, gsi_next (&gsi_orig), gsi_next (&gsi_update)) { source_location loop_locus, guard_locus; - tree loop_block, guard_block; orig_phi = gsi_stmt (gsi_orig); update_phi = gsi_stmt (gsi_update); @@ -531,19 +527,13 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop, loop_locus = gimple_phi_arg_location_from_edge (orig_phi, EDGE_SUCC (loop->latch, 0)); - loop_block = gimple_phi_arg_block_from_edge (orig_phi, - EDGE_SUCC (loop->latch, - 0)); - guard_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, loop_preheader_edge (loop)); guard_locus = gimple_phi_arg_location_from_edge (orig_phi, loop_preheader_edge (loop)); - guard_block = gimple_phi_arg_block_from_edge (orig_phi, - loop_preheader_edge (loop)); - add_phi_arg (new_phi, loop_arg, new_exit_e, loop_locus, loop_block); - add_phi_arg (new_phi, guard_arg, guard_edge, guard_locus, guard_block); + add_phi_arg (new_phi, loop_arg, new_exit_e, loop_locus); + add_phi_arg (new_phi, guard_arg, guard_edge, guard_locus); /* 1.3. Update phi in successor block. */ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == loop_arg @@ -562,7 +552,7 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop, *new_exit_bb); /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. */ - add_phi_arg (new_phi, loop_arg, single_exit (loop), loop_locus, loop_block); + add_phi_arg (new_phi, loop_arg, single_exit (loop), loop_locus); /* 2.3. Update phi in successor of NEW_EXIT_BB: */ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, new_exit_e) == loop_arg); @@ -690,8 +680,8 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop, if (new_name2) guard_arg = new_name2; - add_phi_arg (new_phi, loop_arg, new_exit_e, UNKNOWN_LOCATION, NULL); - add_phi_arg (new_phi, guard_arg, guard_edge, UNKNOWN_LOCATION, NULL); + add_phi_arg (new_phi, loop_arg, new_exit_e, UNKNOWN_LOCATION); + add_phi_arg (new_phi, guard_arg, guard_edge, UNKNOWN_LOCATION); /* 1.3. Update phi in successor block. */ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == orig_def); @@ -706,8 +696,7 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop, *new_exit_bb); /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. */ - add_phi_arg (new_phi, loop_arg, single_exit (loop), UNKNOWN_LOCATION, - NULL); + add_phi_arg (new_phi, loop_arg, single_exit (loop), UNKNOWN_LOCATION); /* 2.3. Update phi in successor of NEW_EXIT_BB: */ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, new_exit_e) == loop_arg); @@ -744,7 +733,7 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop, /* 3.3. GUARD_BB has one incoming edge: */ gcc_assert (EDGE_COUNT (guard_edge->src->preds) == 1); add_phi_arg (new_phi, arg, EDGE_PRED (guard_edge->src, 0), - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); /* 3.4. Update phi in successor of GUARD_BB: */ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, guard_edge) @@ -870,16 +859,14 @@ slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, edge e) { edge new_loop_exit_edge; source_location locus; - tree block; locus = gimple_phi_arg_location_from_edge (phi, single_exit (loop)); - block = gimple_phi_arg_block_from_edge (phi, single_exit (loop)); if (EDGE_SUCC (new_loop->header, 0)->dest == new_loop->latch) new_loop_exit_edge = EDGE_SUCC (new_loop->header, 1); else new_loop_exit_edge = EDGE_SUCC (new_loop->header, 0); - add_phi_arg (phi, phi_arg, new_loop_exit_edge, locus, block); + add_phi_arg (phi, phi_arg, new_loop_exit_edge, locus); } } @@ -918,8 +905,7 @@ slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, edge e) phi_arg = PHI_ARG_DEF_FROM_EDGE (phi, entry_e); if (phi_arg) add_phi_arg (phi, phi_arg, new_exit_e, - gimple_phi_arg_location_from_edge (phi, entry_e), - gimple_phi_arg_block_from_edge (phi, entry_e)); + gimple_phi_arg_location_from_edge (phi, entry_e)); } redirect_edge_and_branch_force (entry_e, new_loop->header); @@ -1103,8 +1089,8 @@ set_prologue_iterations (basic_block bb_before_first_loop, newphi = create_phi_node (var, bb_before_first_loop); add_phi_arg (newphi, prologue_after_cost_adjust_name, e_fallthru, - UNKNOWN_LOCATION, NULL); - add_phi_arg (newphi, *first_niters, e_false, UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); + add_phi_arg (newphi, *first_niters, e_false, UNKNOWN_LOCATION); *first_niters = PHI_RESULT (newphi); } @@ -1207,7 +1193,7 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop, new_phi); use_operand_p use_p; - add_phi_arg (new_phi, vop, exit_e, UNKNOWN_LOCATION, NULL); + add_phi_arg (new_phi, vop, exit_e, UNKNOWN_LOCATION); gimple_phi_set_result (new_phi, new_vop); FOR_EACH_IMM_USE_STMT (stmt, imm_iter, vop) if (stmt != new_phi && gimple_bb (stmt) != loop->header) @@ -2565,8 +2551,7 @@ vect_loop_versioning (loop_vec_info loop_vinfo, new_exit_bb); arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, e); add_phi_arg (new_phi, arg, new_exit_e, - gimple_phi_arg_location_from_edge (orig_phi, e), - gimple_phi_arg_block_from_edge (orig_phi, e)); + gimple_phi_arg_location_from_edge (orig_phi, e)); adjust_phi_and_debug_stmts (orig_phi, e, PHI_RESULT (new_phi)); } diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 4ddc9fbfe98..166b69d70e4 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -3123,9 +3123,9 @@ get_initial_def_for_induction (gimple iv_phi) NULL)); /* Set the arguments of the phi node: */ - add_phi_arg (induction_phi, vec_init, pe, UNKNOWN_LOCATION, NULL); + add_phi_arg (induction_phi, vec_init, pe, UNKNOWN_LOCATION); add_phi_arg (induction_phi, vec_def, loop_latch_edge (iv_loop), - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); /* In case that vectorization factor (VF) is bigger than the number @@ -3609,13 +3609,13 @@ vect_create_epilog_for_reduction (VEC (tree, heap) *vect_defs, gimple stmt, { /* Set the loop-entry arg of the reduction-phi. */ add_phi_arg (phi, vec_init_def, loop_preheader_edge (loop), - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); /* Set the loop-latch arg for the reduction-phi. */ if (j > 0) def = vect_get_vec_def_for_stmt_copy (vect_unknown_def_type, def); - add_phi_arg (phi, def, loop_latch_edge (loop), UNKNOWN_LOCATION, NULL); + add_phi_arg (phi, def, loop_latch_edge (loop), UNKNOWN_LOCATION); if (vect_print_dump_info (REPORT_DETAILS)) { @@ -4233,10 +4233,9 @@ vect_finalize_reduction: /* Update phi node arguments with vs0 and vs2. */ add_phi_arg (vect_phi, vect_phi_init, loop_preheader_edge (outer_loop), - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); add_phi_arg (vect_phi, PHI_RESULT (inner_phi), - loop_latch_edge (outer_loop), UNKNOWN_LOCATION, - NULL); + loop_latch_edge (outer_loop), UNKNOWN_LOCATION); if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "created double reduction phi " diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 19e36e01322..671b229ef9a 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -5060,7 +5060,7 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, if (i == vec_num - 1 && j == ncopies - 1) add_phi_arg (phi, lsq, loop_latch_edge (containing_loop), - UNKNOWN_LOCATION, NULL); + UNKNOWN_LOCATION); msq = lsq; } } diff --git a/gcc/tree.h b/gcc/tree.h index 42d2e66762e..f5ffb1cd2a0 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2035,7 +2035,6 @@ struct GTY(()) phi_arg_d { pointer arithmetic with it. See phi_arg_index_from_use. */ struct ssa_use_operand_d imm_use; tree def; - tree block; location_t locus; }; diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 58ba30a11a5..69051c6a788 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -1245,12 +1245,10 @@ gimple_ic (gimple icall_stmt, struct cgraph_node *direct_call, SSA_NAME_DEF_STMT (result) = phi; gimple_call_set_lhs (icall_stmt, make_ssa_name (SSA_NAME_VAR (result), icall_stmt)); - add_phi_arg (phi, gimple_call_lhs (icall_stmt), e_ij, UNKNOWN_LOCATION, - NULL); + add_phi_arg (phi, gimple_call_lhs (icall_stmt), e_ij, UNKNOWN_LOCATION); gimple_call_set_lhs (dcall_stmt, make_ssa_name (SSA_NAME_VAR (result), dcall_stmt)); - add_phi_arg (phi, gimple_call_lhs (dcall_stmt), e_dj, UNKNOWN_LOCATION, - NULL); + add_phi_arg (phi, gimple_call_lhs (dcall_stmt), e_dj, UNKNOWN_LOCATION); } /* Build an EH edge for the direct call if necessary. */ @@ -1478,12 +1476,10 @@ gimple_stringop_fixed_value (gimple vcall_stmt, tree icall_size, int prob, SSA_NAME_DEF_STMT (result) = phi; gimple_call_set_lhs (vcall_stmt, make_ssa_name (SSA_NAME_VAR (result), vcall_stmt)); - add_phi_arg (phi, gimple_call_lhs (vcall_stmt), e_vj, UNKNOWN_LOCATION, - NULL); + add_phi_arg (phi, gimple_call_lhs (vcall_stmt), e_vj, UNKNOWN_LOCATION); gimple_call_set_lhs (icall_stmt, make_ssa_name (SSA_NAME_VAR (result), icall_stmt)); - add_phi_arg (phi, gimple_call_lhs (icall_stmt), e_ij, UNKNOWN_LOCATION, - NULL); + add_phi_arg (phi, gimple_call_lhs (icall_stmt), e_ij, UNKNOWN_LOCATION); } /* Because these are all string op builtins, they're all nothrow. */ |