X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftree-profile.c;h=9bc1bc3eae01d1f9542176dab15b122fc771a3f0;hb=0395dc5ef775b63c96fcb017b334b4fae14447d2;hp=e974329a4880e439a85d0f6f84eeba9cbfad8386;hpb=7cf0dbf3e5eee1286c76c26a836622c9c9974736;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index e974329a488..9bc1bc3eae0 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -30,9 +30,7 @@ along with GCC; see the file COPYING3. If not see #include "system.h" #include "coretypes.h" #include "tm.h" -#include "rtl.h" #include "flags.h" -#include "output.h" #include "regs.h" #include "expr.h" #include "function.h" @@ -44,7 +42,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-pass.h" #include "timevar.h" #include "value-prof.h" -#include "ggc.h" #include "cgraph.h" static GTY(()) tree gcov_type_node; @@ -83,6 +80,7 @@ tree_init_ic_make_global_vars (void) DECL_ARTIFICIAL (ic_void_ptr_var) = 1; DECL_INITIAL (ic_void_ptr_var) = NULL; varpool_finalize_decl (ic_void_ptr_var); + varpool_mark_needed_node (varpool_node (ic_void_ptr_var)); gcov_type_ptr = build_pointer_type (get_gcov_type ()); ic_gcov_type_ptr_var @@ -94,6 +92,7 @@ tree_init_ic_make_global_vars (void) DECL_ARTIFICIAL (ic_gcov_type_ptr_var) = 1; DECL_INITIAL (ic_gcov_type_ptr_var) = NULL; varpool_finalize_decl (ic_gcov_type_ptr_var); + varpool_mark_needed_node (varpool_node (ic_gcov_type_ptr_var)); } static void @@ -343,7 +342,7 @@ tree_gen_ic_func_profiler (void) gimple stmt1, stmt2; tree tree_uid, cur_func; - if (!c_node->needed) + if (cgraph_only_called_directly_p (c_node)) return; tree_init_edge_profiler ();