summaryrefslogtreecommitdiff
path: root/gcc/tree-profile.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-11 19:08:44 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-11 19:08:44 +0000
commit6c0782b190ae85409e2b509586553cd540e3cc02 (patch)
tree866b6afdd093937e7194ff58fa04991fef160e5f /gcc/tree-profile.c
parent038c21f1c13e32ff37f03d9e0704e4e83fdee166 (diff)
downloadgcc-6c0782b190ae85409e2b509586553cd540e3cc02.tar.gz
* lto-cgraph.c: Include gcov-io.h
(output_profile_summary): New function. (output_cgraph): Use it. (input_profile_summary): New function. (input_cgraph): Use it. * coverage.c (build_ctr_info_value): Use varpool; initalize DECL_ASSEMBLER_NAME. (create_coverage): Likewise. * tree-profile.c (tree_init_ic_make_global_vars): Likewise. (tree_init_edge_profiler): Likewise. * Makefile.in (lto-cgraph.o): Add dependency on gcov-io.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154100 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r--gcc/tree-profile.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 95ab49a7543..2b75461b188 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -82,7 +82,7 @@ tree_init_ic_make_global_vars (void)
TREE_PUBLIC (ic_void_ptr_var) = 0;
DECL_ARTIFICIAL (ic_void_ptr_var) = 1;
DECL_INITIAL (ic_void_ptr_var) = NULL;
- assemble_variable (ic_void_ptr_var, 0, 0, 0);
+ varpool_finalize_decl (ic_void_ptr_var);
gcov_type_ptr = build_pointer_type (get_gcov_type ());
ic_gcov_type_ptr_var
@@ -93,7 +93,7 @@ tree_init_ic_make_global_vars (void)
TREE_PUBLIC (ic_gcov_type_ptr_var) = 0;
DECL_ARTIFICIAL (ic_gcov_type_ptr_var) = 1;
DECL_INITIAL (ic_gcov_type_ptr_var) = NULL;
- assemble_variable (ic_gcov_type_ptr_var, 0, 0, 0);
+ varpool_finalize_decl (ic_gcov_type_ptr_var);
}
static void
@@ -159,6 +159,14 @@ tree_init_edge_profiler (void)
tree_ior_profiler_fn
= build_fn_decl ("__gcov_ior_profiler",
average_profiler_fn_type);
+ /* LTO streamer needs assembler names. Because we create these decls
+ late, we need to initialize them by hand. */
+ DECL_ASSEMBLER_NAME (tree_interval_profiler_fn);
+ DECL_ASSEMBLER_NAME (tree_pow2_profiler_fn);
+ DECL_ASSEMBLER_NAME (tree_one_value_profiler_fn);
+ DECL_ASSEMBLER_NAME (tree_indirect_call_profiler_fn);
+ DECL_ASSEMBLER_NAME (tree_average_profiler_fn);
+ DECL_ASSEMBLER_NAME (tree_ior_profiler_fn);
}
}