diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-06 15:18:12 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-06 15:18:12 +0000 |
commit | 6d3d8bf0e6cb73524be01e28cb82a484cd3d11fd (patch) | |
tree | 820ec7df31409951f282adc16ff5ec3ded32d3ef /gcc/tree-profile.c | |
parent | 9927c7532bf96ce34dda35328f758117bbbb5ae6 (diff) | |
download | gcc-6d3d8bf0e6cb73524be01e28cb82a484cd3d11fd.tar.gz |
* tree-flow.h (get_var_ann): Don't declare.
* tree-flow-inline.h (get_var_ann): Remove.
(set_is_used): Use var_ann, not get_var_ann.
* tree-dfa.c (add_referenced_var): Inline body of get_var_ann.
* tree-profile.c (gimple_gen_edge_profiler): Call
find_referenced_var_in.
(gimple_gen_interval_profiler): Ditto.
(gimple_gen_pow2_profiler): Ditto.
(gimple_gen_one_value_profiler): Ditto.
(gimple_gen_average_profiler): Ditto.
(gimple_gen_ior_profiler): Ditto.
(gimple_gen_ic_profiler): Ditto plus call add_referenced_var.
(gimple_gen_ic_func_profiler): Call add_referenced_var.
* tree-mudflap.c (execute_mudflap_function_ops): Call
add_referenced_var.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179618 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r-- | gcc/tree-profile.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 98f7d678792..c56650c066e 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -224,6 +224,7 @@ 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)); @@ -270,6 +271,7 @@ 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); } @@ -290,6 +292,7 @@ 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); } @@ -310,6 +313,7 @@ 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); } @@ -340,9 +344,12 @@ 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)); + add_referenced_var (ic_void_ptr_var); gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT); gsi_insert_before (&gsi, stmt2, GSI_SAME_STMT); @@ -378,9 +385,11 @@ gimple_gen_ic_func_profiler (void) counter_ptr = force_gimple_operand_gsi (&gsi, ic_gcov_type_ptr_var, true, NULL_TREE, true, GSI_SAME_STMT); + add_referenced_var (ic_gcov_type_ptr_var); ptr_var = force_gimple_operand_gsi (&gsi, ic_void_ptr_var, true, NULL_TREE, true, GSI_SAME_STMT); + add_referenced_var (ic_void_ptr_var); tree_uid = build_int_cst (gcov_type_node, current_function_funcdef_no); stmt1 = gimple_build_call (tree_indirect_call_profiler_fn, 4, counter_ptr, tree_uid, cur_func, ptr_var); @@ -429,6 +438,7 @@ 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); } @@ -449,6 +459,7 @@ 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); } |