aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-08-02 08:14:54 +0000
committerRichard Guenther <rguenther@suse.de>2012-08-02 08:14:54 +0000
commitcf6b8c832b5cd39c37b6716f002556c91648bfd4 (patch)
tree2d5192c2c186651200e37d636c85698c0eb873d5 /gcc/tree-inline.c
parentf5a5be226d4eb84b3e246bd6cf9efd6865069778 (diff)
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. * 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190067 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c63
1 files changed, 0 insertions, 63 deletions
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,