aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-profile.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-08-10 09:20:29 +0000
committerRichard Guenther <rguenther@suse.de>2012-08-10 09:20:29 +0000
commite5f432d060a6ef33ccedf1c727f530b1243513e9 (patch)
tree538c53782d228ed64003ea7683f91c231d7ad532 /gcc/tree-profile.c
parentab6ce3f56be41e76776e8dbb2ed272028b085e77 (diff)
2012-08-10 Richard Guenther <rguenther@suse.de>
* tree-ssa-pre.c (pretemp, storetemp, prephitemp): Remove. (need_creation): Remove. (get_representative_for): Use anonymous named SSA names. (create_expression_by_pieces): Likewise. (insert_into_preds_of_block): Likewise. (init_pre): Do not init removed vars. (fini_pre): Do not free need_creation. * tree-ssa-forwprop.c (simplify_bitwise_binary): Use anonymous SSA names. * tree-ssa-loop-manip.c (create_iv): Likewise. * value-prof.c (gimple_divmod_fixed_value): Likewise. (gimple_mod_pow2): Likewise. (gimple_mod_subtract): Likewise. (gimple_ic): Likewise. (gimple_stringop_fixed_value): Likewise. * tree-ssa-phiopt.c (condstoretemp): Remove. (tree_ssa_phiopt_worker): Use anonymous named SSA names. (conditional_replacement): Likewise. (abs_replacement): Likewise. (cond_store_replacement): Likewise. (cond_if_else_store_replacement_1): Likewise. * tree-ssa-loop-im.c (rewrite_reciprocal): Likewise. (rewrite_bittest): Likewise. * tree-ssa-reassoc.c (build_and_add_sum): Get type from callers and build anonymous SSA names. (undistribute_ops_list): Adjust. (eliminate_redundant_comparison): Use anonymous SSA names. (rewrite_expr_tree_parallel): Likewise. (get_reassoc_pow_ssa_name): Remove. (attempt_builtin_powi): Adjust. (reassociate_bb): Likewise. * tree-ssa-strlen.c (get_string_length): Use anonymous SSA names. * 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-generic.c (expand_vector_divmod): Likewise. * tree-profile.c (gcov_type_tmp_var): Remove. (gimple_init_edge_profiler): Do not initialize it and use anonymous SSA names. (gimple_gen_ic_profiler): Likewise. (tree_profiling): Adjust. * tree-sra.c (build_ref_for_offset): Use anonymous SSA names. * tree-ssa-math-opts.c (execute_cse_sincos_1): Likewise. (powi_as_mults_1): Likewise. (powi_as_mults): Likewise. (build_and_insert_call): Adjust. (build_and_insert_binop): Likewise. (build_and_insert_ref): Likewise. (build_and_insert_cast): Likewise. (gimple_expand_builtin_pow): Likewise. (gimple_expand_builtin_cabs): Likewise. (execute_optimize_bswap): Use anonymous SSA names. (convert_mult_to_widen): Likewise. (convert_plusminus_to_widen): Likewise. * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise. * tree-ssa-propagate.c (update_call_from_tree): Likewise. * tree-if-conv.c (ifc_temp_var): Likewise. * tree-loop-distribution.c (generate_memset_builtin): Likewise. * tree-parloops.c (take_address_of): Likewise. * tree-vect-data-refs.c (vect_permute_store_chain): Likewise. (vect_permute_load_chain): Likewise. * tree-vect-loop-manip.c (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. * tree-vrp.c (simplify_truth_ops_using_ranges): Likewise. (simplify_float_conversion_using_ranges): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190288 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r--gcc/tree-profile.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 676461cd087..a5b6bc80281 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -44,7 +44,6 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
static GTY(()) tree gcov_type_node;
-static GTY(()) tree gcov_type_tmp_var;
static GTY(()) tree tree_interval_profiler_fn;
static GTY(()) tree tree_pow2_profiler_fn;
static GTY(()) tree tree_one_value_profiler_fn;
@@ -209,20 +208,18 @@ gimple_init_edge_profiler (void)
void
gimple_gen_edge_profiler (int edgeno, edge e)
{
- tree ref, one;
+ tree ref, one, gcov_type_tmp_var;
gimple stmt1, stmt2, stmt3;
- /* We share one temporary variable declaration per function. This
- gets re-set in tree_profiling. */
- if (gcov_type_tmp_var == NULL_TREE)
- gcov_type_tmp_var = create_tmp_reg (gcov_type_node, "PROF_edge_counter");
ref = tree_coverage_counter_ref (GCOV_COUNTER_ARCS, edgeno);
one = build_int_cst (gcov_type_node, 1);
+ gcov_type_tmp_var = make_temp_ssa_name (gcov_type_node,
+ NULL, "PROF_edge_counter");
stmt1 = gimple_build_assign (gcov_type_tmp_var, ref);
- gimple_assign_set_lhs (stmt1, make_ssa_name (gcov_type_tmp_var, stmt1));
+ gcov_type_tmp_var = make_temp_ssa_name (gcov_type_node,
+ NULL, "PROF_edge_counter");
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));
stmt3 = gimple_build_assign (unshare_expr (ref), gimple_assign_lhs (stmt2));
gsi_insert_on_edge (e, stmt1);
gsi_insert_on_edge (e, stmt2);
@@ -335,10 +332,9 @@ gimple_gen_ic_profiler (histogram_value value, unsigned tag, unsigned base)
stmt3: __gcov_indirect_call_callee = tmp1;
*/
- tmp1 = create_tmp_reg (ptr_void, "PROF");
stmt1 = gimple_build_assign (ic_gcov_type_ptr_var, ref_ptr);
+ tmp1 = make_temp_ssa_name (ptr_void, NULL, "PROF");
stmt2 = gimple_build_assign (tmp1, unshare_expr (value->hvalue.value));
- gimple_assign_set_lhs (stmt2, make_ssa_name (tmp1, stmt2));
stmt3 = gimple_build_assign (ic_void_ptr_var, gimple_assign_lhs (stmt2));
gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT);
@@ -481,9 +477,6 @@ tree_profiling (void)
push_cfun (DECL_STRUCT_FUNCTION (node->symbol.decl));
current_function_decl = node->symbol.decl;
- /* Re-set global shared temporary variable for edge-counters. */
- gcov_type_tmp_var = NULL_TREE;
-
/* Local pure-const may imply need to fixup the cfg. */
if (execute_fixup_cfg () & TODO_cleanup_cfg)
cleanup_tree_cfg ();