aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-profile.c
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2011-04-22 00:03:41 +0000
committerXinliang David Li <davidxl@google.com>2011-04-22 00:03:41 +0000
commit7b487f089e9dbe601b7ad07474b1857f5de2f99e (patch)
treeb1de1237c40a1783f8ec27a4d0b43d7764263cf2 /gcc/tree-profile.c
parent0f9e7c7a2c9907214b50bba5a52aaa4fad326734 (diff)
Remove cgraph pid
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@172848 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r--gcc/tree-profile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 9619ae8ee12..c296dffe3c3 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;
}