summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog140
-rw-r--r--gcc/cfgexpand.c7
-rw-r--r--gcc/cgraphunit.c9
-rw-r--r--gcc/gimple-fold.c10
-rw-r--r--gcc/gimple-low.c2
-rw-r--r--gcc/gimple-pretty-print.c17
-rw-r--r--gcc/gimple-streamer-in.c5
-rw-r--r--gcc/gimplify.c11
-rw-r--r--gcc/graphite-clast-to-gimple.c3
-rw-r--r--gcc/graphite-sese-to-poly.c3
-rw-r--r--gcc/ipa-prop.c1
-rw-r--r--gcc/ipa-split.c1
-rw-r--r--gcc/matrix-reorg.c1
-rw-r--r--gcc/omp-low.c14
-rw-r--r--gcc/passes.c3
-rw-r--r--gcc/testsuite/ChangeLog12
-rw-r--r--gcc/testsuite/gcc.dg/torture/pta-callused-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-19.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c2
-rw-r--r--gcc/trans-mem.c3
-rw-r--r--gcc/tree-cfg.c10
-rw-r--r--gcc/tree-complex.c1
-rw-r--r--gcc/tree-dfa.c227
-rw-r--r--gcc/tree-flow-inline.h37
-rw-r--r--gcc/tree-flow.h27
-rw-r--r--gcc/tree-if-conv.c1
-rw-r--r--gcc/tree-inline.c63
-rw-r--r--gcc/tree-into-ssa.c8
-rw-r--r--gcc/tree-parloops.c6
-rw-r--r--gcc/tree-pass.h2
-rw-r--r--gcc/tree-predcom.c4
-rw-r--r--gcc/tree-profile.c8
-rw-r--r--gcc/tree-sra.c5
-rw-r--r--gcc/tree-ssa-live.c12
-rw-r--r--gcc/tree-ssa-loop-im.c5
-rw-r--r--gcc/tree-ssa-loop-ivopts.c1
-rw-r--r--gcc/tree-ssa-loop-manip.c15
-rw-r--r--gcc/tree-ssa-math-opts.c11
-rw-r--r--gcc/tree-ssa-operands.c1
-rw-r--r--gcc/tree-ssa-phiopt.c4
-rw-r--r--gcc/tree-ssa-phiprop.c1
-rw-r--r--gcc/tree-ssa-pre.c7
-rw-r--r--gcc/tree-ssa-propagate.c1
-rw-r--r--gcc/tree-ssa-reassoc.c8
-rw-r--r--gcc/tree-ssa-strlen.c3
-rw-r--r--gcc/tree-ssa.c19
-rw-r--r--gcc/tree-switch-conversion.c2
-rw-r--r--gcc/tree-tailcall.c3
-rw-r--r--gcc/tree-vect-data-refs.c8
-rw-r--r--gcc/tree-vect-generic.c1
-rw-r--r--gcc/tree-vect-loop-manip.c11
-rw-r--r--gcc/tree-vect-patterns.c6
-rw-r--r--gcc/tree-vect-stmts.c1
59 files changed, 188 insertions, 596 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f0026f2e5d8..c48a2e27ddc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,143 @@
+2012-08-02 Richard Guenther <rguenther@suse.de>
+
+ * tree-dfa.c (referenced_var_lookup): Remove.
+ (find_referenced_vars): Remove.
+ (pass_referenced_vars): Likewise.
+ (make_rename_temp): Do not add referenced vars.
+ (dump_referenced_vars): Remove.
+ (debug_referenced_vars): Likewise.
+ (dump_dfa_stats): Do not dump referenced var stats.
+ (find_vars_r): Remove.
+ (find_referenced_vars_in): Likewise.
+ (referenced_var_check_and_insert): Likewise.
+ (add_referenced_var_1): Likewise.
+ (remove_referenced_var): Likewise.
+ * tree-flow.h (referenced_var_lookup): Likewise.
+ (struct gimple_df): Remove referenced_vars member.
+ (typedef referenced_var_iterator): Remove.
+ (FOR_EACH_REFERENCED_VAR): Likewise.
+ (num_referenced_vars): Likewise.
+ (debug_referenced_vars, dump_referenced_vars): Likewise.
+ (add_referenced_var_1, add_referenced_var): Likewise.
+ (remove_referenced_var): Likewise.
+ (find_referenced_vars_in): Likewise.
+ * tree-flow-inline.h (gimple_referenced_vars): Remove.
+ (first_referenced_var): Likewise.
+ (end_referenced_vars_p): Likewise.
+ (next_referenced_var): Likewise.
+ * cfgexpand.c (update_alias_info_with_stack_vars): Remove assert.
+ * gimple-pretty-print.c (pp_points_to_solution): Dump UIDs
+ unconditionally.
+ * tree-into-ssa.c (dump_decl_set): Likewise.
+ (pass_build_ssa): Do not require PROP_referenced_vars.
+ * tree-ssa.c (target_for_debug_bind): Virtual operands are
+ not suitable, but all register type vars are.
+ (init_tree_ssa): Do not allocate referenced vars.
+ (delete_tree_ssa): Do not free referenced vars.
+ * cgraphunit.c (init_lowered_empty_function): Do not set
+ PROP_referenced_vars.
+ (assemble_thunk): Do not add referenced vars.
+ * gimple-fold.c (canonicalize_constructor_val): Likewise.
+ (gimplify_and_update_call_from_tree): Likewise.
+ * gimple-streamer-in.c (input_bb): Likewise.
+ * passes.c (init_optimization_passes): Do not run
+ pass_referenced_vars.
+ (dump_properties): Do not dump PROP_referenced_vars.
+ * tree-inline.c (remap_decl): Do not add referenced vars.
+ (remap_gimple_op_r): Likewise.
+ (copy_tree_body_r): Likewise.
+ (copy_bb): Likewise.
+ (setup_one_parameter): Likewise.
+ (declare_return_variable): Likewise.
+ (copy_decl_for_dup_finish): Likewise.
+ (copy_arguments_for_versioning): Likewise.
+ (tree_function_versioning): Likewise.
+ * tree-pass.h (PROP_referenced_vars): Remove.
+ (pass_referenced_vars): Likewise.
+ * tree-profile.c (gimple_gen_edge_profiler): Do not add referenced vars.
+ (gimple_gen_interval_profiler): Likewise.
+ (gimple_gen_pow2_profiler): Likewise.
+ (gimple_gen_one_value_profiler): Likewise.
+ (gimple_gen_ic_profiler): Likewise.
+ (gimple_gen_average_profiler): Likewise.
+ (gimple_gen_ior_profiler): Likewise.
+ * tree-ssa-live.c (remove_unused_locals): Do not touch referenced vars.
+ * tree-cfg.c (replace_ssa_name): Do not add referenced vars.
+ (move_stmt_op): Likewise.
+ * tree-ssa-operands.c (create_vop_var): Likewise.
+ * gimple-low.c (record_vars_into): Likewise.
+ * gimplify.c (gimple_regimplify_operands): Likewise.
+ (force_gimple_operand_1): Likewise.
+ * omp-low.c (expand_omp_for_generic): Likewise.
+ (expand_omp_for_static_chunk): Likewise.
+ (expand_omp_atomic_pipeline): Likewise.
+ * graphite-clast-to-gimple.c (graphite_create_new_loop): Likewise.
+ (translate_clast_assignment): Likewise.
+ * graphite-sese-to-poly.c (create_zero_dim_array): Likewise.
+ (handle_scalar_deps_crossing_scop_limits): Likewise.
+ * ipa-prop.c (ipa_modify_formal_parameters): Likewise.
+ * ipa-split.c (split_function): Likewise.
+ * matrix-reorg.c (transform_access_sites): Likewise.
+ * trans-mem.c (tm_log_add): Likewise.
+ (ipa_tm_insert_gettmclone_call): Likewise.
+ * tree-complex.c (create_one_component_var): Likewise.
+ * tree-if-conv.c (ifc_temp_var): Likewise.
+ * tree-parloops.c (take_address_of): Likewise.
+ (initialize_reductions): Likewise.
+ (separate_decls_in_region_name): Likewise.
+ (create_call_for_reduction_1): Likewise.
+ (separate_decls_in_region): Likewise.
+ * tree-predcom.c (predcom_tmp_var): Likewise.
+ (reassociate_to_the_same_stmt): Likewise.
+ * tree-sra.c (build_ref_for_offset): Likewise.
+ (create_access_replacement): Likewise.
+ (get_replaced_param_substitute): Likewise.
+ (sra_ipa_reset_debug_stmts): Likewise.
+ * tree-ssa-loop-im.c (rewrite_reciprocal): Likewise.
+ (rewrite_bittest): Likewise.
+ * tree-ssa-loop-ivopts.c (create_new_iv): Likewise.
+ * tree-ssa-loop-manip.c (create_iv): Likewise.
+ (tree_transform_and_unroll_loop): Likewise.
+ * tree-ssa-math-opts.c (powi_as_mults): Likewise.
+ (build_and_insert_call): Likewise.
+ (gimple_expand_builtin_cabs): Likewise.
+ (execute_optimize_bswap): Likewise.
+ * tree-ssa-phiopt.c (conditional_replacement): Likewise.
+ (abs_replacement): Likewise.
+ (cond_store_replacement): Likewise.
+ (cond_if_else_store_replacement_1): Likewise.
+ * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
+ * tree-ssa-pre.c (get_representative_for): Likewise.
+ (create_expression_by_pieces): Likewise.
+ (insert_into_preds_of_block): Likewise.
+ * tree-ssa-propagate.c (update_call_from_tree): Likewise.
+ * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
+ (eliminate_redundant_comparison): Likewise.
+ (rewrite_expr_tree_parallel): Likewise.
+ (get_reassoc_pow_ssa_name): Likewise.
+ * tree-ssa-strlen.c (get_string_length): Likewise.
+ * tree-switch-conversion.c (emit_case_bit_tests): Likewise.
+ (build_arrays): Likewise.
+ * tree-tailcall.c (adjust_return_value_with_ops): Likewise.
+ (create_tailcall_accumulator): Likewise.
+ * tree-vect-data-refs.c (vect_get_new_vect_var): Likewise.
+ (vect_create_addr_base_for_vector_ref): Likewise.
+ (vect_permute_store_chain): Likewise.
+ (vect_permute_load_chain): Likewise.
+ * tree-vect-generic.c (expand_vector_divmod): Likewise.
+ * tree-vect-loop-manip.c (set_prologue_iterations): Likewise.
+ (vect_build_loop_niters): Likewise.
+ (vect_generate_tmps_on_preheader): Likewise.
+ (vect_update_ivs_after_vectorizer): Likewise.
+ (vect_gen_niters_for_prolog_loop): Likewise.
+ (vect_do_peeling_for_alignment): Likewise.
+ (vect_create_cond_for_align_checks): Likewise.
+ * tree-vect-patterns.c (vect_recog_temp_ssa_var): Likewise.
+ (vect_handle_widen_op_by_const): Likewise.
+ (vect_operation_fits_smaller_type): Likewise.
+ (vect_recog_over_widening_pattern): Likewise.
+ * tree-vect-stmts.c (vect_init_vector): Likewise.
+
2012-08-01 Alexandre Oliva <aoliva@redhat.com>
PR debug/52983
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 1f165343b30..3be686936fb 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -620,13 +620,6 @@ update_alias_info_with_stack_vars (void)
{
tree decl = stack_vars[j].decl;
unsigned int uid = DECL_PT_UID (decl);
- /* We should never end up partitioning SSA names (though they
- may end up on the stack). Neither should we allocate stack
- space to something that is unused and thus unreferenced, except
- for -O0 where we are preserving even unreferenced variables. */
- gcc_assert (DECL_P (decl)
- && (!optimize
- || referenced_var_lookup (cfun, DECL_UID (decl))));
bitmap_set_bit (part, uid);
*((bitmap *) pointer_map_insert (decls_to_partitions,
(void *)(size_t) uid)) = part;
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 1e17fdfff62..12a254dad9d 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1228,8 +1228,7 @@ init_lowered_empty_function (tree decl)
DECL_SAVED_TREE (decl) = error_mark_node;
cfun->curr_properties |=
- (PROP_gimple_lcf | PROP_gimple_leh | PROP_cfg | PROP_referenced_vars |
- PROP_ssa | PROP_gimple_any);
+ (PROP_gimple_lcf | PROP_gimple_leh | PROP_cfg | PROP_ssa | PROP_gimple_any);
/* Create BB for body of the function and connect it properly. */
bb = create_basic_block (NULL, (void *) 0, ENTRY_BLOCK_PTR);
@@ -1454,12 +1453,8 @@ assemble_thunk (struct cgraph_node *node)
virtual_offset));
else
VEC_quick_push (tree, vargs, a);
- add_referenced_var (a);
for (i = 1, arg = DECL_CHAIN (a); i < nargs; i++, arg = DECL_CHAIN (arg))
- {
- add_referenced_var (arg);
- VEC_quick_push (tree, vargs, arg);
- }
+ VEC_quick_push (tree, vargs, arg);
call = gimple_build_call_vec (build_fold_addr_expr_loc (0, alias), vargs);
VEC_free (tree, heap, vargs);
gimple_call_set_from_thunk (call, true);
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index ccdeb34677f..d708c80afa9 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -169,12 +169,7 @@ canonicalize_constructor_val (tree cval, tree from_decl)
&& !can_refer_decl_in_current_unit_p (base, from_decl))
return NULL_TREE;
if (TREE_CODE (base) == VAR_DECL)
- {
- TREE_ADDRESSABLE (base) = 1;
- if (cfun && gimple_referenced_vars (cfun)
- && !is_global_var (base))
- add_referenced_var (base);
- }
+ TREE_ADDRESSABLE (base) = 1;
else if (TREE_CODE (base) == FUNCTION_DECL)
{
/* Make sure we create a cgraph node for functions we'll reference.
@@ -653,9 +648,6 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
for (i = gsi_start (stmts); !gsi_end_p (i); gsi_next (&i))
{
new_stmt = gsi_stmt (i);
- /* The replacement can expose previously unreferenced variables. */
- if (gimple_in_ssa_p (cfun))
- find_referenced_vars_in (new_stmt);
/* If the new statement possibly has a VUSE, update it with exact SSA
name we know will reach this one. */
if (gimple_has_mem_ops (new_stmt))
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index bdb6c1e6f9e..f17d8e7750a 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -1009,8 +1009,6 @@ record_vars_into (tree vars, tree fn)
/* Record the variable. */
add_local_decl (cfun, var);
- if (gimple_referenced_vars (cfun))
- add_referenced_var (var);
}
if (fn != current_function_decl)
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index adeb9f6c473..a9b071c82e4 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -597,21 +597,8 @@ pp_points_to_solution (pretty_printer *buffer, struct pt_solution *pt)
pp_string (buffer, "{ ");
EXECUTE_IF_SET_IN_BITMAP (pt->vars, 0, i, bi)
{
- tree var = referenced_var_lookup (cfun, i);
- if (var)
- {
- dump_generic_node (buffer, var, 0, dump_flags, false);
- if (DECL_PT_UID (var) != DECL_UID (var))
- {
- pp_string (buffer, "ptD.");
- pp_decimal_int (buffer, DECL_PT_UID (var));
- }
- }
- else
- {
- pp_string (buffer, "D.");
- pp_decimal_int (buffer, i);
- }
+ pp_string (buffer, "D.");
+ pp_decimal_int (buffer, i);
pp_character (buffer, ' ');
}
pp_character (buffer, '}');
diff --git a/gcc/gimple-streamer-in.c b/gcc/gimple-streamer-in.c
index 1b6bf4bd6d7..f40be0e6edf 100644
--- a/gcc/gimple-streamer-in.c
+++ b/gcc/gimple-streamer-in.c
@@ -310,8 +310,6 @@ input_bb (struct lto_input_block *ib, enum LTO_tags tag,
while (tag)
{
gimple stmt = input_gimple_stmt (ib, data_in, fn, tag);
- if (!is_gimple_debug (stmt))
- find_referenced_vars_in (stmt);
gsi_insert_after (&bsi, stmt, GSI_NEW_STMT);
/* After the statement, expect a 0 delimiter or the EH region
@@ -332,8 +330,7 @@ input_bb (struct lto_input_block *ib, enum LTO_tags tag,
tag = streamer_read_record_start (ib);
while (tag)
{
- gimple phi = input_phi (ib, bb, data_in, fn);
- find_referenced_vars_in (phi);
+ input_phi (ib, bb, data_in, fn);
tag = streamer_read_record_start (ib);
}
}
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 0c6ea1ce2be..8c724892d12 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -8363,7 +8363,7 @@ void
gimple_regimplify_operands (gimple stmt, gimple_stmt_iterator *gsi_p)
{
size_t i, num_ops;
- tree orig_lhs = NULL_TREE, lhs, t;
+ tree orig_lhs = NULL_TREE, lhs;
gimple_seq pre = NULL;
gimple post_stmt = NULL;
struct gimplify_ctx gctx;
@@ -8522,10 +8522,6 @@ gimple_regimplify_operands (gimple stmt, gimple_stmt_iterator *gsi_p)
break;
}
- if (gimple_referenced_vars (cfun))
- for (t = gimplify_ctxp->temps; t ; t = TREE_CHAIN (t))
- add_referenced_var (t);
-
if (!gimple_seq_empty_p (pre))
gsi_insert_seq_before (gsi_p, pre, GSI_SAME_STMT);
if (post_stmt)
@@ -8542,7 +8538,6 @@ tree
force_gimple_operand_1 (tree expr, gimple_seq *stmts,
gimple_predicate gimple_test_f, tree var)
{
- tree t;
enum gimplify_status ret;
struct gimplify_ctx gctx;
@@ -8574,10 +8569,6 @@ force_gimple_operand_1 (tree expr, gimple_seq *stmts,
gcc_assert (ret != GS_ERROR);
}
- if (gimple_referenced_vars (cfun))
- for (t = gimplify_ctxp->temps; t ; t = DECL_CHAIN (t))
- add_referenced_var (t);
-
pop_gimplify_context (NULL);
return expr;
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index 42f96c716af..90ca682f9c6 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -949,8 +949,6 @@ graphite_create_new_loop (edge entry_edge, struct clast_for *stmt,
(entry_edge, lb, stride, ub, ivvar, &iv, &iv_after_increment,
outer ? outer : entry_edge->src->loop_father);
- add_referenced_var (ivvar);
-
mpz_init (low);
mpz_init (up);
compute_bounds_for_loop (stmt, low, up);
@@ -1221,7 +1219,6 @@ translate_clast_assignment (struct clast_assignment *stmt, edge next_e,
var = create_tmp_var (type, "graphite_var");
new_name = force_gimple_operand (clast_to_gcc_expression (type, expr, ip),
&stmts, true, var);
- add_referenced_var (var);
if (stmts)
{
gsi_insert_seq_on_edge (next_e, stmts);
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index c421d9699c9..ca3ae8f8633 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2100,8 +2100,6 @@ create_zero_dim_array (tree var, const char *base_name)
tree array_type = build_array_type (elt_type, index_type);
tree base = create_tmp_var (array_type, base_name);
- add_referenced_var (base);
-
return build4 (ARRAY_REF, elt_type, base, integer_zero_node, NULL_TREE,
NULL_TREE);
}
@@ -2405,7 +2403,6 @@ handle_scalar_deps_crossing_scop_limits (scop_p scop, tree def, gimple stmt)
gimple assign = gimple_build_assign (new_name, def);
gimple_stmt_iterator psi = gsi_after_labels (SESE_EXIT (region)->dest);
- add_referenced_var (var);
SSA_NAME_DEF_STMT (new_name) = assign;
update_stmt (assign);
gsi_insert_before (&psi, assign, GSI_SAME_STMT);
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 214b2de3521..0c49fdf8f6c 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -2355,7 +2355,6 @@ ipa_modify_formal_parameters (tree fndecl, ipa_parm_adjustment_vec adjustments,
DECL_IGNORED_P (new_parm) = 1;
layout_decl (new_parm, 0);
- add_referenced_var (new_parm);
adj->base = parm;
adj->reduction = new_parm;
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 33cf7d25a53..be21436f0d3 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -1083,7 +1083,6 @@ split_function (struct split_point *split_point)
{
/* This parm might not have been used up to now, but is going to be
used, hence register it. */
- add_referenced_var (parm);
if (is_gimple_reg (parm))
{
arg = gimple_default_def (cfun, parm);
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c
index 966ab0c254d..830980a20f0 100644
--- a/gcc/matrix-reorg.c
+++ b/gcc/matrix-reorg.c
@@ -1833,7 +1833,6 @@ transform_access_sites (void **slot, void *data ATTRIBUTE_UNUSED)
== MEM_REF);
/* Emit convert statement to convert to type of use. */
tmp = create_tmp_var (TREE_TYPE (lhs), "new");
- add_referenced_var (tmp);
rhs = gimple_assign_rhs1 (acc_info->stmt);
rhs = fold_convert (TREE_TYPE (tmp),
TREE_OPERAND (rhs, 0));
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 4d3b03239d4..1696fec2539 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -3732,11 +3732,6 @@ expand_omp_for_generic (struct omp_region *region,
iend0 = create_tmp_var (fd->iter_type, ".iend0");
TREE_ADDRESSABLE (istart0) = 1;
TREE_ADDRESSABLE (iend0) = 1;
- if (gimple_referenced_vars (cfun))
- {
- add_referenced_var (istart0);
- add_referenced_var (iend0);
- }
/* See if we need to bias by LLONG_MIN. */
if (fd->iter_type == long_long_unsigned_type_node
@@ -4458,7 +4453,6 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
trip_var = create_tmp_reg (itype, ".trip");
if (gimple_in_ssa_p (cfun))
{
- add_referenced_var (trip_var);
trip_init = make_ssa_name (trip_var, NULL);
trip_main = make_ssa_name (trip_var, NULL);
trip_back = make_ssa_name (trip_var, NULL);
@@ -5305,11 +5299,7 @@ expand_omp_atomic_pipeline (basic_block load_bb, basic_block store_bb,
gsi_insert_before (&si, stmt, GSI_SAME_STMT);
loadedi = create_tmp_var (itype, NULL);
if (gimple_in_ssa_p (cfun))
- {
- add_referenced_var (iaddr);
- add_referenced_var (loadedi);
- loadedi = make_ssa_name (loadedi, NULL);
- }
+ loadedi = make_ssa_name (loadedi, NULL);
}
else
{
@@ -5386,8 +5376,6 @@ expand_omp_atomic_pipeline (basic_block load_bb, basic_block store_bb,
else
{
old_vali = create_tmp_var (TREE_TYPE (loadedi), NULL);
- if (gimple_in_ssa_p (cfun))
- add_referenced_var (old_vali);
stmt = gimple_build_assign (old_vali, loadedi);
gsi_insert_before (&si, stmt, GSI_SAME_STMT);
diff --git a/gcc/passes.c b/gcc/passes.c
index 7709671a052..877a768515a 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1285,7 +1285,6 @@ init_optimization_passes (void)
NEXT_PASS (pass_init_datastructures);
NEXT_PASS (pass_expand_omp);
- NEXT_PASS (pass_referenced_vars);
NEXT_PASS (pass_build_ssa);
NEXT_PASS (pass_lower_vector);
NEXT_PASS (pass_early_warn_uninitialized);
@@ -2603,8 +2602,6 @@ dump_properties (FILE *dump, unsigned int props)
fprintf (dump, "PROP_gimple_leh\n");
if (props & PROP_cfg)
fprintf (dump, "PROP_cfg\n");
- if (props & PROP_referenced_vars)
- fprintf (dump, "PROP_referenced_vars\n");
if (props & PROP_ssa)
fprintf (dump, "PROP_ssa\n");
if (props & PROP_no_crit_edges)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5c05d52e60d..c062bd97815 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,15 @@
+2012-08-02 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/torture/pta-callused-1.c: Adjust.
+ * gcc.dg/torture/pta-ptrarith-3.c: Likewise.
+ * gcc.dg/torture/ssa-pta-fn-1.c: Likewise.
+ * gcc.dg/tree-ssa/alias-19.c: Likewise.
+ * gcc.dg/tree-ssa/pta-escape-1.c: Likewise.
+ * gcc.dg/tree-ssa/pta-escape-2.c: Likewise.
+ * gcc.dg/tree-ssa/pta-escape-3.c: Likewise.
+ * gcc.dg/tree-ssa/pta-ptrarith-1.c: Likewise.
+ * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
+
2012-08-01 Thomas König <tkoenig@gcc.gnu.org>
PR fortran/54033
diff --git a/gcc/testsuite/gcc.dg/torture/pta-callused-1.c b/gcc/testsuite/gcc.dg/torture/pta-callused-1.c
index 93e7d2bed66..5ca71c2a02e 100644
--- a/gcc/testsuite/gcc.dg/torture/pta-callused-1.c
+++ b/gcc/testsuite/gcc.dg/torture/pta-callused-1.c
@@ -21,5 +21,5 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "p.._., points-to vars: { i j }" "alias" } } */
+/* { dg-final { scan-tree-dump "p.._. = { i j }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c b/gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c
index 03f23937b96..938fb296b40 100644
--- a/gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c
+++ b/gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c
@@ -33,5 +33,5 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "q_., points-to vars: { i j k }" "alias" } } */
+/* { dg-final { scan-tree-dump "q_. = { i j k }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c b/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c
index 7781795b4a7..a90b1c62d3b 100644
--- a/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c
+++ b/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c
@@ -56,7 +56,7 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "q_const_., points-to non-local, points-to vars: { i }" "alias" } } */
-/* { dg-final { scan-tree-dump "q_pure_., points-to non-local, points-to escaped, points-to vars: { i }" "alias" } } */
-/* { dg-final { scan-tree-dump "q_normal_., points-to non-local, points-to escaped, points-to vars: { }" "alias" } } */
+/* { dg-final { scan-tree-dump "q_const_. = { NONLOCAL i }" "alias" } } */
+/* { dg-final { scan-tree-dump "q_pure_. = { ESCAPED NONLOCAL i }" "alias" } } */
+/* { dg-final { scan-tree-dump "q_normal_. = { ESCAPED NONLOCAL }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
index 63a4eee0fe6..ce36d2c225d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -fdump-tree-alias-vops" } */
+/* { dg-options "-O2 -fdump-tree-alias" } */
const static int a;
@@ -26,5 +26,4 @@ int main()
}
/* { dg-final { scan-tree-dump "q_. = { a b }" "alias" } } */
-/* { dg-final { scan-tree-dump "q_., points-to vars: { D..... b }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c
index 7cc19be6c49..a4244171305 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c
@@ -33,5 +33,5 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to NULL, points-to vars: { x }" "alias" } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c
index 878352d269c..8580382fca6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c
@@ -34,5 +34,5 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to NULL, points-to vars: { x }" "alias" } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c
index 8e779d8461e..5a121a0d9a7 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c
@@ -38,5 +38,5 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to NULL, points-to vars: { x }" "alias" } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c
index 2a60e1daa23..d4121122bbc 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c
@@ -22,5 +22,5 @@ foo(int i, int j, int k, int off)
return *q;
}
-/* { dg-final { scan-tree-dump "q_., points-to vars: { k }" "ealias" } } */
+/* { dg-final { scan-tree-dump "q_. = { k }" "ealias" } } */
/* { dg-final { cleanup-tree-dump "ealias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c
index ddf934bf813..430f216da9d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c
@@ -22,5 +22,5 @@ foo(int i, int j, int k, int off)
return *q;
}
-/* { dg-final { scan-tree-dump "q_., points-to vars: { i }" "ealias" } } */
+/* { dg-final { scan-tree-dump "q_. = { i }" "ealias" } } */
/* { dg-final { cleanup-tree-dump "ealias" } } */
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index cdb0a8abc10..8afa24d0287 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -1018,7 +1018,6 @@ tm_log_add (basic_block entry_block, tree addr, gimple stmt)
&& !TREE_ADDRESSABLE (type))
{
lp->save_var = create_tmp_reg (TREE_TYPE (lp->addr), "tm_save");
- add_referenced_var (lp->save_var);
lp->stmts = NULL;
lp->entry_block = entry_block;
/* Save addresses separately in dominator order so we don't
@@ -4455,7 +4454,6 @@ ipa_tm_insert_gettmclone_call (struct cgraph_node *node,
gettm_fn = builtin_decl_explicit (safe ? BUILT_IN_TM_GETTMCLONE_SAFE
: BUILT_IN_TM_GETTMCLONE_IRR);
ret = create_tmp_var (ptr_type_node, NULL);
- add_referenced_var (ret);
if (!safe)
transaction_subcode_ior (region, GTMA_MAY_ENTER_IRREVOCABLE);
@@ -4477,7 +4475,6 @@ ipa_tm_insert_gettmclone_call (struct cgraph_node *node,
/* Cast return value from tm_gettmclone* into appropriate function
pointer. */
callfn = create_tmp_var (TREE_TYPE (old_fn), NULL);
- add_referenced_var (callfn);
g2 = gimple_build_assign (callfn,
fold_build1 (NOP_EXPR, TREE_TYPE (callfn), ret));
callfn = make_ssa_name (callfn, g2);
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 29b4e9886ea..981b224cf38 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -5949,9 +5949,6 @@ replace_ssa_name (tree name, struct pointer_map_t *vars_map,
replace_by_duplicate_decl (&decl, vars_map, to_context);
push_cfun (DECL_STRUCT_FUNCTION (to_context));
- if (gimple_in_ssa_p (cfun))
- add_referenced_var (decl);
-
new_name = make_ssa_name (decl, SSA_NAME_DEF_STMT (name));
if (SSA_NAME_IS_DEFAULT_DEF (name))
set_default_def (decl, new_name);
@@ -6022,12 +6019,7 @@ move_stmt_op (tree *tp, int *walk_subtrees, void *data)
if ((TREE_CODE (t) == VAR_DECL
&& !is_global_var (t))
|| TREE_CODE (t) == CONST_DECL)
- {
- struct function *to_fn = DECL_STRUCT_FUNCTION (p->to_context);
- replace_by_duplicate_decl (tp, p->vars_map, p->to_context);
- if (gimple_referenced_vars (to_fn))
- add_referenced_var_1 (*tp, to_fn);
- }
+ replace_by_duplicate_decl (tp, p->vars_map, p->to_context);
}
*walk_subtrees = 0;
}
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index 6106933adbe..afc9d0a1c98 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -422,7 +422,6 @@ create_one_component_var (tree type, tree orig, const char *prefix,
const char *suffix, enum tree_code code)
{
tree r = create_tmp_var (type, prefix);
- add_referenced_var (r);
DECL_SOURCE_LOCATION (r) = DECL_SOURCE_LOCATION (orig);
DECL_ARTIFICIAL (r) = 1;
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index 38c4aea44c4..39555ce4bac 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -63,56 +63,6 @@ static void collect_dfa_stats (struct dfa_stats_d *);
/*---------------------------------------------------------------------------
Dataflow analysis (DFA) routines
---------------------------------------------------------------------------*/
-/* Find all the variables referenced in the function. This function
- builds the global arrays REFERENCED_VARS and CALL_CLOBBERED_VARS.
-
- Note that this function does not look for statement operands, it simply
- determines what variables are referenced in the program and detects
- various attributes for each variable used by alias analysis and the
- optimizer. */
-
-static unsigned int
-find_referenced_vars (void)
-{
- basic_block bb;
- gimple_stmt_iterator si;
-
- FOR_EACH_BB (bb)
- {
- for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
- {
- gimple stmt = gsi_stmt (si);
- if (is_gimple_debug (stmt))
- continue;
- find_referenced_vars_in (gsi_stmt (si));
- }
-
- for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
- find_referenced_vars_in (gsi_stmt (si));
- }
-
- return 0;
-}
-
-struct gimple_opt_pass pass_referenced_vars =
-{
- {
- GIMPLE_PASS,
- "*referenced_vars", /* name */
- NULL, /* gate */
- find_referenced_vars, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_FIND_REFERENCED_VARS, /* tv_id */
- PROP_gimple_leh | PROP_cfg, /* properties_required */
- PROP_referenced_vars, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- 0 /* todo_flags_finish */
- }
-};
-
/* Renumber all of the gimple stmt uids. */
@@ -169,12 +119,7 @@ renumber_gimple_stmt_uids_in_blocks (basic_block *blocks, int n_blocks)
tree
make_rename_temp (tree type, const char *prefix)
{
- tree t = create_tmp_reg (type, prefix);
-
- if (gimple_referenced_vars (cfun))
- add_referenced_var (t);
-
- return t;
+ return create_tmp_reg (type, prefix);
}
@@ -182,36 +127,6 @@ make_rename_temp (tree type, const char *prefix)
/*---------------------------------------------------------------------------
Debugging functions
---------------------------------------------------------------------------*/
-/* Dump the list of all the referenced variables in the current function to
- FILE. */
-
-void
-dump_referenced_vars (FILE *file)
-{
- tree var;
- referenced_var_iterator rvi;
-
- fprintf (file, "\nReferenced variables in %s: %u\n\n",
- get_name (current_function_decl), (unsigned) num_referenced_vars);
-
- FOR_EACH_REFERENCED_VAR (cfun, var, rvi)
- {
- fprintf (file, "Variable: ");
- dump_variable (file, var);
- }
-
- fprintf (file, "\n");
-}
-
-
-/* Dump the list of all the referenced variables to stderr. */
-
-DEBUG_FUNCTION void
-debug_referenced_vars (void)
-{
- dump_referenced_vars (stderr);
-}
-
/* Dump variable VAR and its may-aliases to FILE. */
@@ -297,11 +212,6 @@ dump_dfa_stats (FILE *file)
fprintf (file, fmt_str, "", " instances ", "used ");
fprintf (file, "---------------------------------------------------------\n");
- size = num_referenced_vars * sizeof (tree);
- total += size;
- fprintf (file, fmt_str_1, "Referenced variables", (unsigned long)num_referenced_vars,
- SCALE (size), LABEL (size));
-
size = dfa_stats.num_uses * sizeof (tree *);
total += size;
fprintf (file, fmt_str_1, "USE operands", dfa_stats.num_uses,
@@ -397,97 +307,6 @@ collect_dfa_stats (struct dfa_stats_d *dfa_stats_p ATTRIBUTE_UNUSED)
/*---------------------------------------------------------------------------
Miscellaneous helpers
---------------------------------------------------------------------------*/
-/* Callback for walk_tree. Used to collect variables referenced in
- the function. */
-
-static tree
-find_vars_r (tree *tp, int *walk_subtrees, void *data)
-{
- struct function *fn = (struct function *) data;
-
- /* If we are reading the lto info back in, we need to rescan the
- referenced vars. */
- if (TREE_CODE (*tp) == SSA_NAME)
- add_referenced_var_1 (SSA_NAME_VAR (*tp), fn);
-
- /* If T is a regular variable that the optimizers are interested
- in, add it to the list of variables. */
- else if ((TREE_CODE (*tp) == VAR_DECL
- && !is_global_var (*tp))
- || TREE_CODE (*tp) == PARM_DECL
- || TREE_CODE (*tp) == RESULT_DECL)
- add_referenced_var_1 (*tp, fn);
-
- /* Type, _DECL and constant nodes have no interesting children.
- Ignore them. */
- else if (IS_TYPE_OR_DECL_P (*tp) || CONSTANT_CLASS_P (*tp))
- *walk_subtrees = 0;
-
- return NULL_TREE;
-}
-
-/* Find referenced variables in STMT. */
-
-void
-find_referenced_vars_in (gimple stmt)
-{
- size_t i;
-
- if (gimple_code (stmt) != GIMPLE_PHI)
- {
- for (i = 0; i < gimple_num_ops (stmt); i++)
- walk_tree (gimple_op_ptr (stmt, i), find_vars_r, cfun, NULL);
- }
- else
- {
- walk_tree (gimple_phi_result_ptr (stmt), find_vars_r, cfun, NULL);
-
- for (i = 0; i < gimple_phi_num_args (stmt); i++)
- {
- tree arg = gimple_phi_arg_def (stmt, i);
- walk_tree (&arg, find_vars_r, cfun, NULL);
- }
- }
-}
-
-
-/* Lookup UID in the referenced_vars hashtable and return the associated
- variable. */
-
-tree
-referenced_var_lookup (struct function *fn, unsigned int uid)
-{
- tree h;
- struct tree_decl_minimal in;
- in.uid = uid;
- h = (tree) htab_find_with_hash (gimple_referenced_vars (fn), &in, uid);
- return h;
-}
-
-/* Check if TO is in the referenced_vars hash table and insert it if not.
- Return true if it required insertion. */
-
-static bool
-referenced_var_check_and_insert (tree to, struct function *fn)
-{
- tree *loc;
- struct tree_decl_minimal in;
- unsigned int uid = DECL_UID (to);
-
- in.uid = uid;
- loc = (tree *) htab_find_slot_with_hash (gimple_referenced_vars (fn),
- &in, uid, INSERT);
- if (*loc)
- {
- /* DECL_UID has already been entered in the table. Verify that it is
- the same entry as TO. See PR 27793. */
- gcc_assert (*loc == to);
- return false;
- }
-
- *loc = to;
- return true;
-}
/* Lookup VAR UID in the default_defs hashtable and return the associated
variable. */
@@ -536,50 +355,6 @@ set_default_def (tree var, tree def)
SSA_NAME_IS_DEFAULT_DEF (def) = true;
}
-/* Add VAR to the list of referenced variables if it isn't already there. */
-
-bool
-add_referenced_var_1 (tree var, struct function *fn)
-{
- gcc_checking_assert (TREE_CODE (var) == VAR_DECL
- || TREE_CODE (var) == PARM_DECL
- || TREE_CODE (var) == RESULT_DECL);
-
- gcc_checking_assert ((TREE_CODE (var) == VAR_DECL
- && VAR_DECL_IS_VIRTUAL_OPERAND (var))
- || !is_global_var (var));
-
- /* Insert VAR into the referenced_vars hash table if it isn't present
- and allocate its var-annotation. */
- if (referenced_var_check_and_insert (var, fn))
- return true;
-
- return false;
-}
-
-/* Remove VAR from the list of referenced variables and clear its
- var-annotation. */
-
-void
-remove_referenced_var (tree var)
-{
- struct tree_decl_minimal in;
- void **loc;
- unsigned int uid = DECL_UID (var);
-
- gcc_checking_assert (TREE_CODE (var) == VAR_DECL
- || TREE_CODE (var) == PARM_DECL
- || TREE_CODE (var) == RESULT_DECL);
-
- gcc_checking_assert (!is_global_var (var));
-
- in.uid = uid;
- loc = htab_find_slot_with_hash (gimple_referenced_vars (cfun), &in, uid,
- NO_INSERT);
- if (loc)
- htab_clear_slot (gimple_referenced_vars (cfun), loc);
-}
-
/* If EXP is a handled component reference for a structure, return the
base variable. The access range is delimited by bit positions *POFFSET and
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index c3b9c9cac4b..15f31107475 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -35,15 +35,6 @@ gimple_in_ssa_p (const struct function *fun)
return fun && fun->gimple_df && fun->gimple_df->in_ssa_p;
}
-/* Array of all variables referenced in the function. */
-static inline htab_t
-gimple_referenced_vars (const struct function *fun)
-{
- if (!fun || !fun->gimple_df)
- return NULL;
- return fun->gimple_df->referenced_vars;
-}
-
/* Artificial variable used for the virtual operand FUD chain. */
static inline tree
gimple_vop (const struct function *fun)
@@ -98,34 +89,6 @@ next_htab_element (htab_iterator *hti)
return NULL;
}
-/* Initialize ITER to point to the first referenced variable in the
- referenced_vars hashtable, and return that variable. */
-
-static inline tree
-first_referenced_var (struct function *fn, referenced_var_iterator *iter)
-{
- return (tree) first_htab_element (&iter->hti,
- gimple_referenced_vars (fn));
-}
-
-/* Return true if we have hit the end of the referenced variables ITER is
- iterating through. */
-
-static inline bool
-end_referenced_vars_p (const referenced_var_iterator *iter)
-{
- return end_htab_p (&iter->hti);
-}
-
-/* Make ITER point to the next referenced_var in the referenced_var hashtable,
- and return that variable. */
-
-static inline tree
-next_referenced_var (referenced_var_iterator *iter)
-{
- return (tree) next_htab_element (&iter->hti);
-}
-
/* Get the number of the next statement uid to be allocated. */
static inline unsigned int
gimple_stmt_max_uid (struct function *fn)
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index def75d7c306..888f1f31952 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -45,9 +45,6 @@ struct GTY(()) tm_restart_node {
gimple_ accessor defined in tree-flow-inline.h, all publicly modifiable
fields should have gimple_set accessor. */
struct GTY(()) gimple_df {
- /* Array of all variables referenced in the function. */
- htab_t GTY((param_is (union tree_node))) referenced_vars;
-
/* A vector of all the noreturn calls passed to modify_stmt.
cleanup_control_flow uses it to detect cases where a mid-block
indirect call has been turned into a noreturn call. When this
@@ -292,24 +289,6 @@ extern int int_tree_map_eq (const void *, const void *);
extern unsigned int uid_decl_map_hash (const void *);
extern int uid_decl_map_eq (const void *, const void *);
-typedef struct
-{
- htab_iterator hti;
-} referenced_var_iterator;
-
-/* This macro loops over all the referenced vars, one at a time, putting the
- current var in VAR. Note: You are not allowed to add referenced variables
- to the hashtable while using this macro. Doing so may cause it to behave
- erratically. */
-
-#define FOR_EACH_REFERENCED_VAR(FN, VAR, ITER) \
- for ((VAR) = first_referenced_var ((FN), &(ITER)); \
- !end_referenced_vars_p (&(ITER)); \
- (VAR) = next_referenced_var (&(ITER)))
-
-extern tree referenced_var_lookup (struct function *, unsigned int);
-#define num_referenced_vars htab_elements (gimple_referenced_vars (cfun))
-
#define num_ssa_names (VEC_length (tree, cfun->gimple_df->ssa_names))
#define ssa_name(i) (VEC_index (tree, cfun->gimple_df->ssa_names, (i)))
@@ -463,19 +442,13 @@ extern void renumber_gimple_stmt_uids (void);
extern void renumber_gimple_stmt_uids_in_blocks (basic_block *, int);
extern void dump_dfa_stats (FILE *);
extern void debug_dfa_stats (void);
-extern void debug_referenced_vars (void);
-extern void dump_referenced_vars (FILE *);
extern void dump_variable (FILE *, tree);
extern void debug_variable (tree);
-extern bool add_referenced_var_1 (tree, struct function *);
-#define add_referenced_var(v) add_referenced_var_1 ((v), cfun)
-extern void remove_referenced_var (tree);
extern tree make_rename_temp (tree, const char *);
extern void set_default_def (tree, tree);
extern tree gimple_default_def (struct function *, tree);
extern bool stmt_references_abnormal_ssa_name (gimple);
extern tree get_addr_base_and_unit_offset (tree, HOST_WIDE_INT *);
-extern void find_referenced_vars_in (gimple);
extern void dump_enumerated_decls (FILE *, int);
/* In tree-phinodes.c */
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index e8a65eab758..7c695185096 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -227,7 +227,6 @@ ifc_temp_var (tree type, tree expr, gimple_stmt_iterator *gsi)
/* Create new temporary variable. */
var = create_tmp_var (type, name);
- add_referenced_var (var);
/* Build new statement to assign EXPR to new variable. */
stmt = gimple_build_assign (var, expr);
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 6c052535626..8ca912ef1b1 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -338,17 +338,6 @@ remap_decl (tree decl, copy_body_data *id)
walk_tree (&DECL_QUALIFIER (t), copy_tree_body_r, id, NULL);
}
- if ((TREE_CODE (t) == VAR_DECL
- || TREE_CODE (t) == RESULT_DECL
- || TREE_CODE (t) == PARM_DECL)
- && id->src_fn && DECL_STRUCT_FUNCTION (id->src_fn)
- && gimple_referenced_vars (DECL_STRUCT_FUNCTION (id->src_fn))
- /* We don't want to mark as referenced VAR_DECLs that were
- not marked as such in the src function. */
- && (TREE_CODE (decl) != VAR_DECL
- || referenced_var_lookup (DECL_STRUCT_FUNCTION (id->src_fn),
- DECL_UID (decl))))
- add_referenced_var (t);
return t;
}
@@ -844,14 +833,6 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data)
if (TREE_CODE (*tp) != OMP_CLAUSE)
TREE_TYPE (*tp) = remap_type (TREE_TYPE (*tp), id);
- /* Global variables we haven't seen yet need to go into referenced
- vars. If not referenced from types only. */
- if (gimple_referenced_vars (cfun)
- && TREE_CODE (*tp) == VAR_DECL && !is_global_var (*tp)
- && id->remapping_type_depth == 0
- && !processing_debug_stmt)
- add_referenced_var (*tp);
-
if (TREE_CODE (*tp) == TARGET_EXPR && TREE_OPERAND (*tp, 3))
{
/* The copied TARGET_EXPR has never been expanded, even if the
@@ -1087,14 +1068,6 @@ copy_tree_body_r (tree *tp, int *walk_subtrees, void *data)
tweak some special cases. */
copy_tree_r (tp, walk_subtrees, NULL);
- /* Global variables we haven't seen yet needs to go into referenced
- vars. If not referenced from types or debug stmts only. */
- if (gimple_referenced_vars (cfun)
- && TREE_CODE (*tp) == VAR_DECL && !is_global_var (*tp)
- && id->remapping_type_depth == 0
- && !processing_debug_stmt)
- add_referenced_var (*tp);
-
/* If EXPR has block defined, map it to newly constructed block.
When inlining we want EXPRs without block appear in the block
of function call if we are not remapping a type. */
@@ -1764,7 +1737,6 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
ssa_op_iter i;
tree def;
- find_referenced_vars_in (gsi_stmt (copy_gsi));
FOR_EACH_SSA_TREE_OPERAND (def, stmt, i, SSA_OP_DEF)
if (TREE_CODE (def) == SSA_NAME)
SSA_NAME_DEF_STMT (def) = stmt;
@@ -2558,10 +2530,6 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
function. */
var = copy_decl_to_var (p, id);
- /* We're actually using the newly-created var. */
- if (gimple_in_ssa_p (cfun) && TREE_CODE (var) == VAR_DECL)
- add_referenced_var (var);
-
/* Declare this new variable. */
DECL_CHAIN (var) = *vars;
*vars = var;
@@ -2569,17 +2537,6 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
/* Make gimplifier happy about this variable. */
DECL_SEEN_IN_BIND_EXPR_P (var) = 1;
- /* We are eventually using the value - make sure all variables
- referenced therein are properly recorded. */
- if (value
- && gimple_referenced_vars (cfun)
- && TREE_CODE (value) == ADDR_EXPR)
- {
- tree base = get_base_address (TREE_OPERAND (value, 0));
- if (base && TREE_CODE (base) == VAR_DECL && !is_global_var (base))
- add_referenced_var (base);
- }
-
/* If the parameter is never assigned to, has no SSA_NAMEs created,
we would not need to create a new variable here at all, if it
weren't for debug info. Still, we can just use the argument
@@ -2885,9 +2842,6 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
gcc_assert (TREE_CODE (TYPE_SIZE_UNIT (callee_type)) == INTEGER_CST);
var = copy_result_decl_to_var (result, id);
- if (gimple_referenced_vars (cfun))
- add_referenced_var (var);
-
DECL_SEEN_IN_BIND_EXPR_P (var) = 1;
/* Do not have the rest of GCC warn about this variable as it should
@@ -2941,8 +2895,6 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
&& !is_gimple_val (var))
{
tree temp = create_tmp_var (TREE_TYPE (result), "retvalptr");
- if (gimple_referenced_vars (cfun))
- add_referenced_var (temp);
insert_decl_map (id, result, temp);
/* When RESULT_DECL is in SSA form, we need to remap and initialize
it's default_def SSA_NAME. */
@@ -4773,14 +4725,6 @@ copy_decl_for_dup_finish (copy_body_data *id, tree decl, tree copy)
new function. */
DECL_CONTEXT (copy) = id->dst_fn;
- if (TREE_CODE (decl) == VAR_DECL
- /* C++ clones functions during parsing, before
- referenced_vars. */
- && gimple_referenced_vars (DECL_STRUCT_FUNCTION (id->src_fn))
- && referenced_var_lookup (DECL_STRUCT_FUNCTION (id->src_fn),
- DECL_UID (decl)))
- add_referenced_var (copy);
-
return copy;
}
@@ -4894,7 +4838,6 @@ copy_arguments_for_versioning (tree orig_parm, copy_body_data * id,
as temporary variable later in function, the uses will be
replaced by local variable. */
tree var = copy_decl_to_var (arg, id);
- add_referenced_var (var);
insert_decl_map (id, arg, var);
/* Declare this new variable. */
DECL_CHAIN (var) = *vars;
@@ -5175,12 +5118,6 @@ tree_function_versioning (tree old_decl, tree new_decl,
if (TREE_CODE (op) == VIEW_CONVERT_EXPR)
op = TREE_OPERAND (op, 0);
- if (TREE_CODE (op) == ADDR_EXPR)
- {
- op = get_base_address (TREE_OPERAND (op, 0));
- if (op && TREE_CODE (op) == VAR_DECL && !is_global_var (op))
- add_referenced_var (op);
- }
gcc_assert (TREE_CODE (replace_info->old_tree) == PARM_DECL);
init = setup_one_parameter (&id, replace_info->old_tree,
replace_info->new_tree, id.src_fn,
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 0884f85761d..c18f080d138 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -1551,11 +1551,7 @@ dump_decl_set (FILE *file, bitmap set)
EXECUTE_IF_SET_IN_BITMAP (set, 0, i, bi)
{
- tree var = referenced_var_lookup (cfun, i);
- if (var)
- print_generic_expr (file, var, 0);
- else
- fprintf (file, "D.%u", i);
+ fprintf (file, "D.%u", i);
fprintf (file, " ");
}
@@ -2467,7 +2463,7 @@ struct gimple_opt_pass pass_build_ssa =
NULL, /* next */
0, /* static_pass_number */
TV_TREE_SSA_OTHER, /* tv_id */
- PROP_cfg | PROP_referenced_vars, /* properties_required */
+ PROP_cfg, /* properties_required */
PROP_ssa, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 92faa996a8c..d8dbc212e6b 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -482,7 +482,6 @@ take_address_of (tree obj, tree type, edge entry, htab_t decl_address,
bvar = create_tmp_var (TREE_TYPE (addr),
get_name (TREE_OPERAND
(TREE_OPERAND (*var_p, 0), 0)));
- add_referenced_var (bvar);
stmt = gimple_build_assign (bvar, addr);
name = make_ssa_name (bvar, stmt);
gimple_assign_set_lhs (stmt, name);
@@ -540,7 +539,6 @@ initialize_reductions (void **slot, void *data)
/* Create a new variable to initialize the reduction. */
type = TREE_TYPE (PHI_RESULT (reduc->reduc_phi));
bvar = create_tmp_var (type, "reduction");
- add_referenced_var (bvar);
c = build_omp_clause (gimple_location (reduc->reduc_stmt),
OMP_CLAUSE_REDUCTION);
@@ -805,7 +803,6 @@ separate_decls_in_region_name (tree name,
{
var_copy = create_tmp_var (TREE_TYPE (var), get_name (var));
DECL_GIMPLE_REG_P (var_copy) = DECL_GIMPLE_REG_P (var);
- add_referenced_var (var_copy);
nielt = XNEW (struct int_tree_map);
nielt->uid = uid;
nielt->to = var_copy;
@@ -1066,7 +1063,6 @@ create_call_for_reduction_1 (void **slot, void *data)
new_bb = e->dest;
tmp_load = create_tmp_var (TREE_TYPE (TREE_TYPE (addr)), NULL);
- add_referenced_var (tmp_load);
tmp_load = make_ssa_name (tmp_load, NULL);
load = gimple_build_omp_atomic_load (tmp_load, addr);
SSA_NAME_DEF_STMT (tmp_load) = load;
@@ -1352,9 +1348,7 @@ separate_decls_in_region (edge entry, edge exit, htab_t reduction_list,
/* Create the loads and stores. */
*arg_struct = create_tmp_var (type, ".paral_data_store");
- add_referenced_var (*arg_struct);
nvar = create_tmp_var (build_pointer_type (type), ".paral_data_load");
- add_referenced_var (nvar);
*new_arg_struct = make_ssa_name (nvar, NULL);
ld_st_data->store = *arg_struct;
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 081e48c4050..80ff51302ed 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -142,7 +142,6 @@ struct simple_ipa_opt_pass
#define PROP_gimple_lcf (1 << 1) /* lowered control flow */
#define PROP_gimple_leh (1 << 2) /* lowered eh */
#define PROP_cfg (1 << 3)
-#define PROP_referenced_vars (1 << 4)
#define PROP_ssa (1 << 5)
#define PROP_no_crit_edges (1 << 6)
#define PROP_rtl (1 << 7)
@@ -267,7 +266,6 @@ extern struct gimple_opt_pass pass_lower_eh_dispatch;
extern struct gimple_opt_pass pass_lower_resx;
extern struct gimple_opt_pass pass_build_cfg;
extern struct gimple_opt_pass pass_early_tree_profile;
-extern struct gimple_opt_pass pass_referenced_vars;
extern struct gimple_opt_pass pass_cleanup_eh;
extern struct gimple_opt_pass pass_sra;
extern struct gimple_opt_pass pass_sra_early;
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index cb7d0883222..eb1538e5208 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -1450,8 +1450,6 @@ predcom_tmp_var (tree ref, unsigned i, bitmap tmp_vars)
/* We never access the components of the temporary variable in predictive
commoning. */
tree var = create_tmp_reg (type, get_lsm_tmp_name (ref, i));
-
- add_referenced_var (var);
bitmap_set_bit (tmp_vars, DECL_UID (var));
return var;
}
@@ -2191,12 +2189,10 @@ reassociate_to_the_same_stmt (tree name1, tree name2)
/* Insert the new statement combining NAME1 and NAME2 before S1, and
combine it with the rhs of S1. */
var = create_tmp_reg (type, "predreastmp");
- add_referenced_var (var);
new_name = make_ssa_name (var, NULL);
new_stmt = gimple_build_assign_with_ops (code, new_name, name1, name2);
var = create_tmp_reg (type, "predreastmp");
- add_referenced_var (var);
tmp_name = make_ssa_name (var, NULL);
/* Rhs of S1 may now be either a binary expression with operation
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 41879530303..676461cd087 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -220,7 +220,6 @@ gimple_gen_edge_profiler (int edgeno, edge e)
one = build_int_cst (gcov_type_node, 1);
stmt1 = gimple_build_assign (gcov_type_tmp_var, ref);
gimple_assign_set_lhs (stmt1, make_ssa_name (gcov_type_tmp_var, stmt1));
- find_referenced_vars_in (stmt1);
stmt2 = gimple_build_assign_with_ops (PLUS_EXPR, gcov_type_tmp_var,
gimple_assign_lhs (stmt1), one);
gimple_assign_set_lhs (stmt2, make_ssa_name (gcov_type_tmp_var, stmt2));
@@ -267,7 +266,6 @@ gimple_gen_interval_profiler (histogram_value value, unsigned tag, unsigned base
val = prepare_instrumented_value (&gsi, value);
call = gimple_build_call (tree_interval_profiler_fn, 4,
ref_ptr, val, start, steps);
- find_referenced_vars_in (call);
gsi_insert_before (&gsi, call, GSI_NEW_STMT);
}
@@ -288,7 +286,6 @@ gimple_gen_pow2_profiler (histogram_value value, unsigned tag, unsigned base)
true, NULL_TREE, true, GSI_SAME_STMT);
val = prepare_instrumented_value (&gsi, value);
call = gimple_build_call (tree_pow2_profiler_fn, 2, ref_ptr, val);
- find_referenced_vars_in (call);
gsi_insert_before (&gsi, call, GSI_NEW_STMT);
}
@@ -309,7 +306,6 @@ gimple_gen_one_value_profiler (histogram_value value, unsigned tag, unsigned bas
true, NULL_TREE, true, GSI_SAME_STMT);
val = prepare_instrumented_value (&gsi, value);
call = gimple_build_call (tree_one_value_profiler_fn, 2, ref_ptr, val);
- find_referenced_vars_in (call);
gsi_insert_before (&gsi, call, GSI_NEW_STMT);
}
@@ -341,10 +337,8 @@ gimple_gen_ic_profiler (histogram_value value, unsigned tag, unsigned base)
tmp1 = create_tmp_reg (ptr_void, "PROF");
stmt1 = gimple_build_assign (ic_gcov_type_ptr_var, ref_ptr);
- find_referenced_vars_in (stmt1);
stmt2 = gimple_build_assign (tmp1, unshare_expr (value->hvalue.value));
gimple_assign_set_lhs (stmt2, make_ssa_name (tmp1, stmt2));
- find_referenced_vars_in (stmt2);
stmt3 = gimple_build_assign (ic_void_ptr_var, gimple_assign_lhs (stmt2));
gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT);
@@ -439,7 +433,6 @@ gimple_gen_average_profiler (histogram_value value, unsigned tag, unsigned base)
true, GSI_SAME_STMT);
val = prepare_instrumented_value (&gsi, value);
call = gimple_build_call (tree_average_profiler_fn, 2, ref_ptr, val);
- find_referenced_vars_in (call);
gsi_insert_before (&gsi, call, GSI_NEW_STMT);
}
@@ -460,7 +453,6 @@ gimple_gen_ior_profiler (histogram_value value, unsigned tag, unsigned base)
true, NULL_TREE, true, GSI_SAME_STMT);
val = prepare_instrumented_value (&gsi, value);
call = gimple_build_call (tree_ior_profiler_fn, 2, ref_ptr, val);
- find_referenced_vars_in (call);
gsi_insert_before (&gsi, call, GSI_NEW_STMT);
}
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 2ae9346b8b4..4294173acad 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1449,7 +1449,6 @@ build_ref_for_offset (location_t loc, tree base, HOST_WIDE_INT offset,
gcc_checking_assert (gsi);
tmp = create_tmp_reg (build_pointer_type (TREE_TYPE (prev_base)), NULL);
- add_referenced_var (tmp);
tmp = make_ssa_name (tmp, NULL);
addr = build_fold_addr_expr (unshare_expr (prev_base));
STRIP_USELESS_TYPE_CONVERSION (addr);
@@ -1866,8 +1865,6 @@ create_access_replacement (struct access *access)
tree repl;
repl = create_tmp_var (access->type, "SR");
- add_referenced_var (repl);
-
if (TREE_CODE (access->type) == COMPLEX_TYPE
|| TREE_CODE (access->type) == VECTOR_TYPE)
{
@@ -4198,7 +4195,6 @@ get_replaced_param_substitute (struct ipa_parm_adjustment *adj)
DECL_NAME (repl) = get_identifier (pretty_name);
obstack_free (&name_obstack, pretty_name);
- add_referenced_var (repl);
adj->new_ssa_base = repl;
}
else
@@ -4582,7 +4578,6 @@ sra_ipa_reset_debug_stmts (ipa_parm_adjustment_vec adjustments)
SET_DECL_RTL (copy, 0);
TREE_USED (copy) = 1;
DECL_CONTEXT (copy) = current_function_decl;
- add_referenced_var (copy);
add_local_decl (cfun, copy);
DECL_CHAIN (copy) =
BLOCK_VARS (DECL_INITIAL (current_function_decl));
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 99420c5bb1c..5128ed9b042 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -692,8 +692,7 @@ void
remove_unused_locals (void)
{
basic_block bb;
- tree var, t;
- referenced_var_iterator rvi;
+ tree var;
bitmap global_unused_vars = NULL;
unsigned srcidx, dstidx, num, ix;
bool have_local_clobbers = false;
@@ -828,7 +827,6 @@ remove_unused_locals (void)
}
else if (!is_used_p (var))
{
- remove_referenced_var (var);
if (cfun->nonlocal_goto_save_area
&& TREE_OPERAND (cfun->nonlocal_goto_save_area, 0) == var)
cfun->nonlocal_goto_save_area = NULL;
@@ -847,14 +845,6 @@ remove_unused_locals (void)
if (dstidx != num)
VEC_truncate (tree, cfun->local_decls, dstidx);
- /* ??? We end up with decls in referenced-vars that are not in
- local-decls. */
- FOR_EACH_REFERENCED_VAR (cfun, t, rvi)
- if (TREE_CODE (t) == VAR_DECL
- && !VAR_DECL_IS_VIRTUAL_OPERAND (t)
- && !is_used_p (t))
- remove_referenced_var (t);
-
remove_unused_scope_block_p (DECL_INITIAL (current_function_decl),
global_unused_vars);
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 558df409cd3..a0a05a31665 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -942,9 +942,7 @@ rewrite_reciprocal (gimple_stmt_iterator *bsi)
lhs = gimple_assign_lhs (stmt);
type = TREE_TYPE (lhs);
- var = create_tmp_var (type, "reciptmp");
- add_referenced_var (var);
- DECL_GIMPLE_REG_P (var) = 1;
+ var = create_tmp_reg (type, "reciptmp");
real_one = build_one_cst (type);
@@ -1024,7 +1022,6 @@ rewrite_bittest (gimple_stmt_iterator *bsi)
/* 1 << B */
var = create_tmp_var (TREE_TYPE (a), "shifttmp");
- add_referenced_var (var);
t = fold_build2 (LSHIFT_EXPR, TREE_TYPE (a),
build_int_cst (TREE_TYPE (a), 1), b);
stmt1 = gimple_build_assign (var, t);
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 41c811fd7e8..d5fa6edbdfd 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -6017,7 +6017,6 @@ create_new_iv (struct ivopts_data *data, struct iv_cand *cand)
}
gimple_add_tmp_var (cand->var_before);
- add_referenced_var (cand->var_before);
base = unshare_expr (cand->iv->base);
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 2c8e803f96e..74eda3cf19f 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -56,10 +56,7 @@ create_iv (tree base, tree step, tree var, struct loop *loop,
edge pe = loop_preheader_edge (loop);
if (!var)
- {
- var = create_tmp_var (TREE_TYPE (base), "ivtmp");
- add_referenced_var (var);
- }
+ var = create_tmp_var (TREE_TYPE (base), "ivtmp");
vb = make_ssa_name (var, NULL);
if (var_before)
@@ -1009,15 +1006,9 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor,
TREE_TYPE (next)))
var = SSA_NAME_VAR (init);
else if (useless_type_conversion_p (TREE_TYPE (next), TREE_TYPE (init)))
- {
- var = create_tmp_var (TREE_TYPE (next), "unrinittmp");
- add_referenced_var (var);
- }
+ var = create_tmp_var (TREE_TYPE (next), "unrinittmp");
else
- {
- var = create_tmp_var (TREE_TYPE (init), "unrinittmp");
- add_referenced_var (var);
- }
+ var = create_tmp_var (TREE_TYPE (init), "unrinittmp");
new_init = make_ssa_name (var, NULL);
phi_rest = create_phi_node (new_init, rest);
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index 30f78bc35cd..13e74bff630 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -989,8 +989,6 @@ powi_as_mults (gimple_stmt_iterator *gsi, location_t loc,
cache[1] = arg0;
target = create_tmp_reg (type, "powmult");
- add_referenced_var (target);
-
result = powi_as_mults_1 (gsi, loc, type, (n < 0) ? -n : n, cache, target);
if (n >= 0)
@@ -1041,10 +1039,7 @@ build_and_insert_call (gimple_stmt_iterator *gsi, location_t loc,
tree ssa_target;
if (!*var)
- {
- *var = create_tmp_reg (TREE_TYPE (arg), "powroot");
- add_referenced_var (*var);
- }
+ *var = create_tmp_reg (TREE_TYPE (arg), "powroot");
call_stmt = gimple_build_call (fn, 1, arg);
ssa_target = make_ssa_name (*var, NULL);
@@ -1354,8 +1349,6 @@ gimple_expand_builtin_cabs (gimple_stmt_iterator *gsi, location_t loc, tree arg)
return NULL_TREE;
target = create_tmp_reg (type, "cabs");
- add_referenced_var (target);
-
real_part = build_and_insert_ref (gsi, loc, type, target,
REALPART_EXPR, arg);
addend1 = build_and_insert_binop (gsi, loc, target, MULT_EXPR,
@@ -1900,7 +1893,6 @@ execute_optimize_bswap (void)
gimple convert_stmt;
bswap_tmp = create_tmp_var (bswap_type, "bswapsrc");
- add_referenced_var (bswap_tmp);
bswap_tmp = make_ssa_name (bswap_tmp, NULL);
convert_stmt = gimple_build_assign_with_ops (
@@ -1918,7 +1910,6 @@ execute_optimize_bswap (void)
gimple convert_stmt;
bswap_tmp = create_tmp_var (bswap_type, "bswapdst");
- add_referenced_var (bswap_tmp);
bswap_tmp = make_ssa_name (bswap_tmp, NULL);
convert_stmt = gimple_build_assign_with_ops (
CONVERT_EXPR, gimple_assign_lhs (stmt), bswap_tmp, NULL);
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 7eea53717ab..328bb3dd0e3 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -177,7 +177,6 @@ create_vop_var (struct function *fn)
TREE_ADDRESSABLE (global_var) = 0;
VAR_DECL_IS_VIRTUAL_OPERAND (global_var) = 1;
- add_referenced_var_1 (global_var, fn);
fn->gimple_df->vop = global_var;
}
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index 5b7d49aa812..c7af5e7eccc 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -691,7 +691,6 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb,
source_location locus_0, locus_1;
new_var2 = create_tmp_var (TREE_TYPE (result), NULL);
- add_referenced_var (new_var2);
new_stmt = gimple_build_assign_with_ops (CONVERT_EXPR, new_var2,
new_var, NULL);
new_var2 = make_ssa_name (new_var2, new_stmt);
@@ -1215,7 +1214,6 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb,
if (negate)
{
tree tmp = create_tmp_var (TREE_TYPE (result), NULL);
- add_referenced_var (tmp);
lhs = make_ssa_name (tmp, NULL);
}
else
@@ -1482,7 +1480,6 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb,
of the memory touched by the store, if we need to. */
if (!condstoretemp || TREE_TYPE (lhs) != TREE_TYPE (condstoretemp))
condstoretemp = create_tmp_reg (TREE_TYPE (lhs), "cstore");
- add_referenced_var (condstoretemp);
/* 3) Insert a load from the memory of the store to the temporary
on the edge which did not contain the store. */
@@ -1567,7 +1564,6 @@ cond_if_else_store_replacement_1 (basic_block then_bb, basic_block else_bb,
of the memory touched by the store, if we need to. */
if (!condstoretemp || TREE_TYPE (lhs) != TREE_TYPE (condstoretemp))
condstoretemp = create_tmp_reg (TREE_TYPE (lhs), "cstore");
- add_referenced_var (condstoretemp);
/* 3) Create a PHI node at the join block, with one argument
holding the old RHS, and the other holding the temporary
diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c
index 0f107f80427..2b77ec3ec26 100644
--- a/gcc/tree-ssa-phiprop.c
+++ b/gcc/tree-ssa-phiprop.c
@@ -196,7 +196,6 @@ phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt,
old_arg,
TREE_OPERAND (rhs, 1)));
gcc_assert (is_gimple_reg (new_var));
- add_referenced_var (new_var);
new_var = make_ssa_name (new_var, tmp);
gimple_assign_set_lhs (tmp, new_var);
gimple_set_location (tmp, locus);
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 8c34c9ba9a6..8c5bc6b9fcc 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -1411,10 +1411,7 @@ get_representative_for (const pre_expr e)
/* Build and insert the assignment of the end result to the temporary
that we will return. */
if (!pretemp || exprtype != TREE_TYPE (pretemp))
- {
- pretemp = create_tmp_reg (exprtype, "pretmp");
- add_referenced_var (pretemp);
- }
+ pretemp = create_tmp_reg (exprtype, "pretmp");
name = make_ssa_name (pretemp, gimple_build_nop ());
VN_INFO_GET (name)->value_id = value_id;
@@ -3110,7 +3107,6 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
pretemp = create_tmp_reg (exprtype, "pretmp");
temp = pretemp;
- add_referenced_var (temp);
newstmt = gimple_build_assign (temp, folded);
name = make_ssa_name (temp, newstmt);
@@ -3369,7 +3365,6 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum,
prephitemp = create_tmp_var (type, "prephitmp");
temp = prephitemp;
- add_referenced_var (temp);
if (TREE_CODE (type) == COMPLEX_TYPE
|| TREE_CODE (type) == VECTOR_TYPE)
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index 15abdc4c44e..cd58ab215e1 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -793,7 +793,6 @@ update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
STRIP_USELESS_TYPE_CONVERSION (expr);
lhs = create_tmp_var (TREE_TYPE (expr), NULL);
new_stmt = gimple_build_assign (lhs, expr);
- add_referenced_var (lhs);
if (gimple_in_ssa_p (cfun))
lhs = make_ssa_name (lhs, new_stmt);
gimple_assign_set_lhs (new_stmt, lhs);
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 5c55fe06a1a..179ceb7c74e 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -1433,7 +1433,6 @@ undistribute_ops_list (enum tree_code opcode,
print_generic_expr (dump_file, oe1->op, 0);
}
tmpvar = create_tmp_reg (TREE_TYPE (oe1->op), NULL);
- add_referenced_var (tmpvar);
zero_one_operation (&oe1->op, c->oecode, c->op);
EXECUTE_IF_SET_IN_SBITMAP (candidates2, first+1, i, sbi0)
{
@@ -1598,7 +1597,6 @@ eliminate_redundant_comparison (enum tree_code opcode,
tree newop2;
gcc_assert (COMPARISON_CLASS_P (t));
tmpvar = create_tmp_var (TREE_TYPE (t), NULL);
- add_referenced_var (tmpvar);
extract_ops_from_tree (t, &subcode, &newop1, &newop2);
STRIP_USELESS_TYPE_CONVERSION (newop1);
STRIP_USELESS_TYPE_CONVERSION (newop2);
@@ -2454,7 +2452,6 @@ rewrite_expr_tree_parallel (gimple stmt, int width,
stmts[i] = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmts[i+1]));
lhs_var = create_tmp_reg (TREE_TYPE (last_rhs1), NULL);
- add_referenced_var (lhs_var);
for (i = 0; i < stmt_num; i++)
{
@@ -3086,10 +3083,7 @@ static tree
get_reassoc_pow_ssa_name (tree *target, tree type)
{
if (!*target || !types_compatible_p (type, TREE_TYPE (*target)))
- {
- *target = create_tmp_reg (type, "reassocpow");
- add_referenced_var (*target);
- }
+ *target = create_tmp_reg (type, "reassocpow");
return make_ssa_name (*target, NULL);
}
diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c
index 05fd10d6d53..e19ad5a0abd 100644
--- a/gcc/tree-ssa-strlen.c
+++ b/gcc/tree-ssa-strlen.c
@@ -416,7 +416,6 @@ get_string_length (strinfo si)
fn = builtin_decl_implicit (BUILT_IN_STRLEN);
gcc_assert (lhs == NULL_TREE);
lhs_var = create_tmp_var (TREE_TYPE (TREE_TYPE (fn)), NULL);
- add_referenced_var (lhs_var);
tem = unshare_expr (gimple_call_arg (stmt, 0));
lenstmt = gimple_build_call (fn, 1, tem);
lhs = make_ssa_name (lhs_var, lenstmt);
@@ -425,7 +424,6 @@ get_string_length (strinfo si)
gsi_insert_before (&gsi, lenstmt, GSI_SAME_STMT);
lhs_var = create_tmp_var (TREE_TYPE (gimple_call_arg (stmt, 0)),
NULL);
- add_referenced_var (lhs_var);
tem = gimple_call_arg (stmt, 0);
if (!ptrofftype_p (TREE_TYPE (lhs)))
{
@@ -455,7 +453,6 @@ get_string_length (strinfo si)
}
gimple_call_set_fndecl (stmt, fn);
lhs_var = create_tmp_var (TREE_TYPE (TREE_TYPE (fn)), NULL);
- add_referenced_var (lhs_var);
lhs = make_ssa_name (lhs_var, stmt);
gimple_call_set_lhs (stmt, lhs);
update_stmt (stmt);
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 910fde42edb..a03d3e6c199 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -249,7 +249,8 @@ target_for_debug_bind (tree var)
if (!MAY_HAVE_DEBUG_STMTS)
return NULL_TREE;
- if (TREE_CODE (var) != VAR_DECL
+ if ((TREE_CODE (var) != VAR_DECL
+ || VAR_DECL_IS_VIRTUAL_OPERAND (var))
&& TREE_CODE (var) != PARM_DECL)
return NULL_TREE;
@@ -259,13 +260,9 @@ target_for_debug_bind (tree var)
if (DECL_IGNORED_P (var))
return NULL_TREE;
- if (!is_gimple_reg (var))
- {
- if (is_gimple_reg_type (TREE_TYPE (var))
- && referenced_var_lookup (cfun, DECL_UID (var)) == NULL_TREE)
- return var;
- return NULL_TREE;
- }
+ /* var-tracking only tracks registers. */
+ if (!is_gimple_reg_type (TREE_TYPE (var)))
+ return NULL_TREE;
return var;
}
@@ -1107,8 +1104,6 @@ void
init_tree_ssa (struct function *fn)
{
fn->gimple_df = ggc_alloc_cleared_gimple_df ();
- fn->gimple_df->referenced_vars = htab_create_ggc (20, uid_decl_map_hash,
- uid_decl_map_eq, NULL);
fn->gimple_df->default_defs = htab_create_ggc (20, uid_ssaname_map_hash,
uid_ssaname_map_eq, NULL);
pt_solution_reset (&fn->gimple_df->escaped);
@@ -1150,10 +1145,6 @@ struct gimple_opt_pass pass_init_datastructures =
void
delete_tree_ssa (void)
{
- /* Remove annotations from every referenced local variable. */
- htab_delete (gimple_referenced_vars (cfun));
- cfun->gimple_df->referenced_vars = NULL;
-
fini_ssanames ();
/* We no longer maintain the SSA operand cache at this point. */
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index 3f4e83d4256..0630f1a5b93 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -425,7 +425,6 @@ emit_case_bit_tests (gimple swtch, tree index_expr,
/* csui = (1 << (word_mode) idx) */
tmp = create_tmp_var (word_type_node, "csui");
- add_referenced_var (tmp);
csui = make_ssa_name (tmp, NULL);
tmp = fold_build2 (LSHIFT_EXPR, word_type_node, word_mode_one,
fold_convert (word_type_node, idx));
@@ -1109,7 +1108,6 @@ build_arrays (gimple swtch, struct switch_conv_info *info)
arr_index_type = build_index_type (info->range_size);
tmp = create_tmp_var (utype, "csui");
- add_referenced_var (tmp);
tidx = make_ssa_name (tmp, NULL);
sub = fold_build2_loc (loc, MINUS_EXPR, utype,
fold_convert_loc (loc, utype, info->index_expr),
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 9ff7ec43c59..078ec67fcf1 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -613,8 +613,6 @@ adjust_return_value_with_ops (enum tree_code code, const char *label,
gimple stmt;
tree result;
- add_referenced_var (tmp);
-
if (types_compatible_p (TREE_TYPE (acc), TREE_TYPE (op1)))
stmt = gimple_build_assign_with_ops (code, tmp, acc, op1);
else
@@ -912,7 +910,6 @@ create_tailcall_accumulator (const char *label, basic_block bb, tree init)
tree tmp = create_tmp_reg (ret_type, label);
gimple phi;
- add_referenced_var (tmp);
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),
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index fe6e40e7926..3223f4b34de 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -3432,7 +3432,6 @@ vect_get_new_vect_var (tree type, enum vect_var_kind var_kind, const char *name)
}
else
new_vect_var = create_tmp_reg (type, prefix);
- add_referenced_var (new_vect_var);
return new_vect_var;
}
@@ -3512,7 +3511,6 @@ vect_create_addr_base_for_vector_ref (gimple stmt,
}
data_ref_base_var = create_tmp_var (TREE_TYPE (data_ref_base), "batmp");
- add_referenced_var (data_ref_base_var);
data_ref_base = force_gimple_operand (data_ref_base, &seq, true,
data_ref_base_var);
gimple_seq_add_seq (new_stmt_list, seq);
@@ -3522,7 +3520,6 @@ vect_create_addr_base_for_vector_ref (gimple stmt,
fold_convert (sizetype, base_offset),
fold_convert (sizetype, init));
dest = create_tmp_var (sizetype, "base_off");
- add_referenced_var (dest);
base_offset = force_gimple_operand (base_offset, &seq, true, dest);
gimple_seq_add_seq (new_stmt_list, seq);
@@ -3530,7 +3527,6 @@ vect_create_addr_base_for_vector_ref (gimple stmt,
{
tree tmp = create_tmp_var (sizetype, "offset");
- add_referenced_var (tmp);
offset = fold_build2 (MULT_EXPR, sizetype,
fold_convert (sizetype, offset), step);
base_offset = fold_build2 (PLUS_EXPR, sizetype,
@@ -4168,7 +4164,6 @@ vect_permute_store_chain (VEC(tree,heap) *dr_chain,
/* Create interleaving stmt:
high = VEC_PERM_EXPR <vect1, vect2, {0, nelt, 1, nelt+1, ...}> */
perm_dest = create_tmp_reg (vectype, "vect_inter_high");
- add_referenced_var (perm_dest);
high = make_ssa_name (perm_dest, NULL);
perm_stmt
= gimple_build_assign_with_ops3 (VEC_PERM_EXPR, high,
@@ -4180,7 +4175,6 @@ vect_permute_store_chain (VEC(tree,heap) *dr_chain,
low = VEC_PERM_EXPR <vect1, vect2, {nelt/2, nelt*3/2, nelt/2+1,
nelt*3/2+1, ...}> */
perm_dest = create_tmp_reg (vectype, "vect_inter_low");
- add_referenced_var (perm_dest);
low = make_ssa_name (perm_dest, NULL);
perm_stmt
= gimple_build_assign_with_ops3 (VEC_PERM_EXPR, low,
@@ -4623,7 +4617,6 @@ vect_permute_load_chain (VEC(tree,heap) *dr_chain,
/* data_ref = permute_even (first_data_ref, second_data_ref); */
perm_dest = create_tmp_reg (vectype, "vect_perm_even");
- add_referenced_var (perm_dest);
perm_stmt = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, perm_dest,
first_vect, second_vect,
@@ -4637,7 +4630,6 @@ vect_permute_load_chain (VEC(tree,heap) *dr_chain,
/* data_ref = permute_odd (first_data_ref, second_data_ref); */
perm_dest = create_tmp_reg (vectype, "vect_perm_odd");
- add_referenced_var (perm_dest);
perm_stmt = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, perm_dest,
first_vect, second_vect,
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index 9c8a70ed218..4b34c214d86 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -668,7 +668,6 @@ expand_vector_divmod (gimple_stmt_iterator *gsi, tree type, tree op0,
<< shifts[i]) - 1);
cst = build_vector (type, vec);
addend = create_tmp_reg (type, NULL);
- add_referenced_var (addend);
addend = make_ssa_name (addend, NULL);
stmt = gimple_build_assign_with_ops3 (VEC_COND_EXPR, addend,
cond, cst, zero);
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index 0008116f069..aaf804ae7f3 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -1078,7 +1078,6 @@ set_prologue_iterations (basic_block bb_before_first_loop,
var = create_tmp_var (TREE_TYPE (scalar_loop_iters),
"prologue_after_cost_adjust");
- add_referenced_var (var);
prologue_after_cost_adjust_name =
force_gimple_operand (scalar_loop_iters, &stmts, false, var);
@@ -1491,7 +1490,6 @@ vect_build_loop_niters (loop_vec_info loop_vinfo, gimple_seq seq)
tree ni = unshare_expr (LOOP_VINFO_NITERS (loop_vinfo));
var = create_tmp_var (TREE_TYPE (ni), "niters");
- add_referenced_var (var);
ni_name = force_gimple_operand (ni, &stmts, false, var);
pe = loop_preheader_edge (loop);
@@ -1558,7 +1556,6 @@ vect_generate_tmps_on_preheader (loop_vec_info loop_vinfo,
if (!is_gimple_val (ni_minus_gap_name))
{
var = create_tmp_var (TREE_TYPE (ni), "ni_gap");
- add_referenced_var (var);
stmts = NULL;
ni_minus_gap_name = force_gimple_operand (ni_minus_gap_name, &stmts,
@@ -1583,7 +1580,6 @@ vect_generate_tmps_on_preheader (loop_vec_info loop_vinfo,
if (!is_gimple_val (ratio_name))
{
var = create_tmp_var (TREE_TYPE (ni), "bnd");
- add_referenced_var (var);
stmts = NULL;
ratio_name = force_gimple_operand (ratio_name, &stmts, true, var);
@@ -1604,7 +1600,6 @@ vect_generate_tmps_on_preheader (loop_vec_info loop_vinfo,
if (!is_gimple_val (ratio_mult_vf_name))
{
var = create_tmp_var (TREE_TYPE (ni), "ratio_mult_vf");
- add_referenced_var (var);
stmts = NULL;
ratio_mult_vf_name = force_gimple_operand (ratio_mult_vf_name, &stmts,
@@ -1829,7 +1824,6 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
init_expr, fold_convert (type, off));
var = create_tmp_var (type, "tmp");
- add_referenced_var (var);
last_gsi = gsi_last_bb (exit_bb);
ni_name = force_gimple_operand_gsi (&last_gsi, ni, false, var,
@@ -2035,7 +2029,6 @@ vect_gen_niters_for_prolog_loop (loop_vec_info loop_vinfo, tree loop_niters)
}
var = create_tmp_var (niters_type, "prolog_loop_niters");
- add_referenced_var (var);
stmts = NULL;
iters_name = force_gimple_operand (iters, &stmts, false, var);
@@ -2153,7 +2146,6 @@ vect_do_peeling_for_alignment (loop_vec_info loop_vinfo,
edge pe = loop_preheader_edge (loop);
tree wide_iters = fold_convert (sizetype, niters_of_prolog_loop);
tree var = create_tmp_var (sizetype, "prolog_loop_adjusted_niters");
- add_referenced_var (var);
wide_prolog_niters = force_gimple_operand (wide_iters, &seq, false,
var);
if (seq)
@@ -2251,7 +2243,6 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
sprintf (tmp_name, "%s%d", "addr2int", i);
addr_tmp = create_tmp_reg (int_ptrsize_type, tmp_name);
- add_referenced_var (addr_tmp);
addr_tmp_name = make_ssa_name (addr_tmp, NULL);
addr_stmt = gimple_build_assign_with_ops (NOP_EXPR, addr_tmp_name,
addr_base, NULL_TREE);
@@ -2265,7 +2256,6 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
/* create: or_tmp = or_tmp | addr_tmp */
sprintf (tmp_name, "%s%d", "orptrs", i);
or_tmp = create_tmp_reg (int_ptrsize_type, tmp_name);
- add_referenced_var (or_tmp);
new_or_tmp_name = make_ssa_name (or_tmp, NULL);
or_stmt = gimple_build_assign_with_ops (BIT_IOR_EXPR,
new_or_tmp_name,
@@ -2283,7 +2273,6 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
/* create: and_tmp = or_tmp & mask */
and_tmp = create_tmp_reg (int_ptrsize_type, "andmask" );
- add_referenced_var (and_tmp);
and_tmp_name = make_ssa_name (and_tmp, NULL);
and_stmt = gimple_build_assign_with_ops (BIT_AND_EXPR, and_tmp_name,
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index aa731cae3a5..fabd65e2070 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -207,8 +207,6 @@ static tree
vect_recog_temp_ssa_var (tree type, gimple stmt)
{
tree var = create_tmp_reg (type, "patt");
-
- add_referenced_var (var);
var = make_ssa_name (var, stmt);
return var;
}
@@ -502,7 +500,6 @@ vect_handle_widen_op_by_const (gimple stmt, enum tree_code code,
/* Create a_T = (NEW_TYPE) a_t; */
*oprnd = gimple_assign_rhs1 (def_stmt);
tmp = create_tmp_reg (new_type, NULL);
- add_referenced_var (tmp);
new_oprnd = make_ssa_name (tmp, NULL);
new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, *oprnd,
NULL_TREE);
@@ -1107,7 +1104,6 @@ vect_operation_fits_smaller_type (gimple stmt, tree def, tree *new_type,
/* Create NEW_OPRND = (INTERM_TYPE) OPRND. */
oprnd = gimple_assign_rhs1 (def_stmt);
tmp = create_tmp_reg (interm_type, NULL);
- add_referenced_var (tmp);
new_oprnd = make_ssa_name (tmp, NULL);
new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
oprnd, NULL_TREE);
@@ -1128,7 +1124,6 @@ vect_operation_fits_smaller_type (gimple stmt, tree def, tree *new_type,
{
/* Create a type conversion HALF_TYPE->INTERM_TYPE. */
tmp = create_tmp_reg (interm_type, NULL);
- add_referenced_var (tmp);
new_oprnd = make_ssa_name (tmp, NULL);
new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
oprnd, NULL_TREE);
@@ -1260,7 +1255,6 @@ vect_recog_over_widening_pattern (VEC (gimple, heap) **stmts,
{
/* Create NEW_TYPE->USE_TYPE conversion. */
tmp = create_tmp_reg (use_type, NULL);
- add_referenced_var (tmp);
new_oprnd = make_ssa_name (tmp, NULL);
pattern_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
var, NULL_TREE);
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 779b6fcf652..8533919e527 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -1271,7 +1271,6 @@ vect_init_vector (gimple stmt, tree val, tree type, gimple_stmt_iterator *gsi)
else
{
new_var = create_tmp_reg (TREE_TYPE (type), NULL);
- add_referenced_var (new_var);
init_stmt = gimple_build_assign_with_ops (NOP_EXPR,
new_var, val,
NULL_TREE);