From: Jan Hubicka Date: Sat, 21 Apr 2012 23:59:25 +0000 (+0200) Subject: method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED. X-Git-Tag: upstream/12.2.0~76771 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ca8f4865287b413a702608a7e40380e599df8d9;p=platform%2Fupstream%2Fgcc.git method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED. * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED. * decl2.c (mark_needed): Likewise. (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED. * decl2.c (cxx_callgraph_analyze_expr): Remove. * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove. * cp-tree.h (cxx_callgraph_analyze_expr): Remove. From-SVN: r186658 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 479ff69..1ad0588 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +2012-04-21 Jan Hubicka + + * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED. + * decl2.c (mark_needed): Likewise. + (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED. + + * decl2.c (cxx_callgraph_analyze_expr): Remove. + * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove. + * cp-tree.h (cxx_callgraph_analyze_expr): Remove. + 2012-04-21 Manuel López-Ibáñez PR 35441 diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h index c668ad8..06cc796 100644 --- a/gcc/cp/cp-objcp-common.h +++ b/gcc/cp/cp-objcp-common.h @@ -110,9 +110,6 @@ extern void cp_common_init_ts (void); #undef LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN #define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN cp_type_quals -#undef LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR -#define LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR cxx_callgraph_analyze_expr - #undef LANG_HOOKS_MAKE_TYPE #define LANG_HOOKS_MAKE_TYPE cxx_make_type #undef LANG_HOOKS_TYPE_FOR_MODE diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 284a634..429ac2c 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -5136,7 +5136,6 @@ extern tree cp_build_parm_decl (tree, tree); extern tree get_guard (tree); extern tree get_guard_cond (tree); extern tree set_guard (tree); -extern tree cxx_callgraph_analyze_expr (tree *, int *); extern void mark_needed (tree); extern bool decl_needed_p (tree); extern void note_vague_linkage_fn (tree); diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 666669e..23b98f5 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1782,10 +1782,7 @@ var_finalized_p (tree var) void mark_needed (tree decl) { - /* It's possible that we no longer need to set - TREE_SYMBOL_REFERENCED here directly, but doing so is - harmless. */ - TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) = 1; + TREE_USED (decl) = 1; mark_decl_referenced (decl); } @@ -1811,9 +1808,7 @@ decl_needed_p (tree decl) return true; /* If this entity was used, let the back end see it; it will decide whether or not to emit it into the object file. */ - if (TREE_USED (decl) - || (DECL_ASSEMBLER_NAME_SET_P (decl) - && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))) + if (TREE_USED (decl)) return true; /* Functions marked "dllexport" must be emitted so that they are visible to other DLLs. */ @@ -3436,44 +3431,6 @@ generate_ctor_and_dtor_functions_for_priority (splay_tree_node n, void * data) return 0; } -/* Called via LANGHOOK_CALLGRAPH_ANALYZE_EXPR. It is supposed to mark - decls referenced from front-end specific constructs; it will be called - only for language-specific tree nodes. - - Here we must deal with member pointers. */ - -tree -cxx_callgraph_analyze_expr (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED) -{ - tree t = *tp; - - switch (TREE_CODE (t)) - { - case PTRMEM_CST: - if (TYPE_PTRMEMFUNC_P (TREE_TYPE (t))) - cgraph_mark_address_taken_node ( - cgraph_get_create_node (PTRMEM_CST_MEMBER (t))); - break; - case BASELINK: - if (TREE_CODE (BASELINK_FUNCTIONS (t)) == FUNCTION_DECL) - cgraph_mark_address_taken_node ( - cgraph_get_create_node (BASELINK_FUNCTIONS (t))); - break; - case VAR_DECL: - if (DECL_CONTEXT (t) - && flag_use_repository - && TREE_CODE (DECL_CONTEXT (t)) == FUNCTION_DECL) - /* If we need a static variable in a function, then we - need the containing function. */ - mark_decl_referenced (DECL_CONTEXT (t)); - break; - default: - break; - } - - return NULL; -} - /* Java requires that we be able to reference a local address for a method, and not be confused by PLT entries. If hidden aliases are supported, collect and return all the functions for which we should diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 79bed4a..cea44d4 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -244,7 +244,6 @@ make_alias_for (tree target, tree newid) TREE_ADDRESSABLE (alias) = 1; TREE_USED (alias) = 1; SET_DECL_ASSEMBLER_NAME (alias, DECL_NAME (alias)); - TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias)) = 1; return alias; }