diff options
author | Xinliang David Li <davidxl@google.com> | 2011-04-22 00:03:41 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@gcc.gnu.org> | 2011-04-22 00:03:41 +0000 |
commit | 903d1e67c4c6a102fb932a1c3dde084248a8dabf (patch) | |
tree | b1de1237c40a1783f8ec27a4d0b43d7764263cf2 /gcc/tree-profile.c | |
parent | 7378e95ff1863346c11ac486189dde1eaa56a794 (diff) | |
download | gcc-903d1e67c4c6a102fb932a1c3dde084248a8dabf.zip gcc-903d1e67c4c6a102fb932a1c3dde084248a8dabf.tar.gz gcc-903d1e67c4c6a102fb932a1c3dde084248a8dabf.tar.bz2 |
Remove cgraph pid
From-SVN: r172848
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r-- | gcc/tree-profile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 9619ae8..c296dff 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see #include "timevar.h" #include "value-prof.h" #include "cgraph.h" +#include "profile.h" static GTY(()) tree gcov_type_node; static GTY(()) tree gcov_type_tmp_var; @@ -369,7 +370,7 @@ gimple_gen_ic_func_profiler (void) ptr_var = force_gimple_operand_gsi (&gsi, ic_void_ptr_var, true, NULL_TREE, true, GSI_SAME_STMT); - tree_uid = build_int_cst (gcov_type_node, c_node->pid); + 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); gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT); @@ -454,6 +455,8 @@ tree_profiling (void) if (cgraph_state == CGRAPH_STATE_FINISHED) return 0; + init_node_map(); + for (node = cgraph_nodes; node; node = node->next) { if (!node->analyzed @@ -548,6 +551,7 @@ tree_profiling (void) pop_cfun (); } + del_node_map(); return 0; } |