aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/tree-profile.c
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-02-10 14:40:41 -0800
committerCaroline Tice <cmtice@google.com>2016-02-26 08:25:55 -0800
commit817a788f9eb01eff367191401d48f2aaa8d4f428 (patch)
tree637f745404b37fbf3fcff629227d7d542725e5fe /gcc-4.9/gcc/tree-profile.c
parenta4ca82cac69c3147143d7b4b4d7cdeb5e02f20ef (diff)
downloadtoolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.tar.gz
toolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.tar.bz2
toolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.zip
Unify ChromeOS and Android versions of GCC.
This CL updates Android's GCC to match ChromeOS's GCC (with appropriate patches applied in both places to make sure no cherry-picked changes are lost). Change-Id: I390140c449b0e5df9ee78a06268319c8c510302f
Diffstat (limited to 'gcc-4.9/gcc/tree-profile.c')
-rw-r--r--gcc-4.9/gcc/tree-profile.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/tree-profile.c b/gcc-4.9/gcc/tree-profile.c
index 6e1d643ce..9504da45c 100644
--- a/gcc-4.9/gcc/tree-profile.c
+++ b/gcc-4.9/gcc/tree-profile.c
@@ -864,8 +864,20 @@ gimple_gen_edge_profiler (int edgeno, edge e)
{
gimple call;
tree tree_edgeno = build_int_cst (gcov_type_node, edgeno);
- tree tree_uid = build_int_cst (gcov_type_node,
+
+ tree tree_uid;
+ if (PARAM_VALUE (PARAM_PROFILE_FUNC_INTERNAL_ID))
+ {
+ tree_uid = build_int_cst (gcov_type_node,
current_function_funcdef_no);
+ }
+ else
+ {
+ gcc_assert (coverage_node_map_initialized_p ());
+
+ tree_uid = build_int_cst
+ (gcov_type_node, cgraph_get_node (current_function_decl)->profile_id);
+ }
tree callback_fn_type
= build_function_type_list (void_type_node,
gcov_type_node,