diff options
author | Jan Hubicka <jh@suse.cz> | 2012-09-19 10:01:56 +0000 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2012-09-19 10:01:56 +0000 |
commit | a874154b85aab178a58783a6ecc7a2b64613a2e2 (patch) | |
tree | adf76d7fd51871b5c848e4b405009efc05ca3097 /gcc/cgraph.h | |
parent | 0fe58ae7fa061364320628713c0efbf236a9bade (diff) |
* symtab.c (insert_to_assembler_name_hash): Do not insert
register vars.
(unlink_from_assembler_name_hash): NULL out pointers of unlinked
var.
(symtab_prevail_in_asm_name_hash): New.
(symtab_initialize_asm_name_hash): Break out from ...
(symtab_node_for_asm): ... here.
(dump_symtab_base): Dump LTO file data.
(verify_symtab_base): Register vars are not in symtab.
* cgraph.h (symtab_initialize_asm_name_hash,
symtab_prevail_in_asm_name_hash): New functions.
(symtab_real_symbol_p): New inline.
* lto-symtab.c: Do not include gt-lto-symtab.h.
(lto_symtab_entry_def): Remove.
(lto_symtab_entry_t): Remove.
(lto_symtab_identifiers): Remove.
(lto_symtab_free): Remove.
(lto_symtab_entry_hash): Remove.
(lto_symtab_entry_eq): Remove.
(lto_symtab_entry_marked_p): Remove.
(lto_symtab_maybe_init_hash_table): Remove.
(resolution_guessed_p, set_resolution_guessed): New functions.
(lto_symtab_register_decl): Only set resolution info.
(lto_symtab_get, lto_symtab_get_resolution): Remove.
(lto_symtab_merge): Reorg to work across symtab; do nothing if decls
are same.
(lto_symtab_resolve_replaceable_p): Reorg to work on symtab.
(lto_symtab_resolve_can_prevail_p): Likewise; only real symbols can
prevail.
(lto_symtab_resolve_symbols): Reorg to work on symtab.
(lto_symtab_merge_decls_2): Likewise.
(lto_symtab_merge_decls_1): Likewise; add debug dumps.
(lto_symtab_merge_decls): Likewise; do not merge at ltrans stage.
(lto_symtab_merge_cgraph_nodes_1): Reorg to work on symtab.
(lto_symtab_merge_cgraph_nodes): Likewise; do not merge at ltrans stage.
(lto_symtab_prevailing_decl): Rewrite to lookup into symtab.
* lto-streaer.h (lto_symtab_free): Remove.
* lto-cgraph.c (add_references): Cleanup.
* varpool.c (varpool_assemble_decl): Skip hard regs.
* lto.c (lto_materialize_function): Update confused comment.
(read_cgraph_and_symbols): Do not free symtab.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191466 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 0d2ad41c43a..b8001a62bc7 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -704,6 +704,8 @@ bool varpool_for_node_and_aliases (struct varpool_node *, bool (*) (struct varpool_node *, void *), void *, bool); void varpool_add_new_variable (tree); +void symtab_initialize_asm_name_hash (void); +void symtab_prevail_in_asm_name_hash (symtab_node node); /* Return true when NODE is function. */ static inline bool @@ -1309,4 +1311,27 @@ cgraph_mark_force_output_node (struct cgraph_node *node) gcc_checking_assert (!node->global.inlined_to); } +/* Return true when the symbol is real symbol, i.e. it is not inline clone + or extern function kept around just for inlining. */ + +static inline bool +symtab_real_symbol_p (symtab_node node) +{ + struct cgraph_node *cnode; + struct ipa_ref *ref; + + if (!symtab_function_p (node)) + return true; + cnode = cgraph (node); + if (cnode->global.inlined_to) + return false; + if (cnode->abstract_and_needed) + return false; + /* We keep virtual clones in symtab. */ + if (!cnode->analyzed + || DECL_EXTERNAL (cnode->symbol.decl)) + return (cnode->callers + || ipa_ref_list_referring_iterate (&cnode->symbol.ref_list, 0, ref)); + return true; +} #endif /* GCC_CGRAPH_H */ |