GCC Middle and Back End API Reference
lto-symtab.c File Reference

Functions

static void lto_cgraph_replace_node (struct cgraph_node *node, struct cgraph_node *prevailing_node)
static void lto_varpool_replace_node (struct varpool_node *vnode, struct varpool_node *prevailing_node)
static bool lto_symtab_merge ()
static bool lto_symtab_resolve_replaceable_p ()
static bool lto_symtab_symbol_p ()
static bool lto_symtab_resolve_can_prevail_p ()
static symtab_node lto_symtab_resolve_symbols ()
static void lto_symtab_merge_decls_2 ()
static void lto_symtab_merge_decls_1 ()
void lto_symtab_merge_decls ()
static void lto_symtab_merge_symbols_1 ()
void lto_symtab_merge_symbols ()
tree lto_symtab_prevailing_decl ()

Variables

vec< tree, va_gc > * lto_global_var_decls

Function Documentation

static bool lto_symtab_merge ( )
static
Merge two variable or function symbol table entries PREVAILING and ENTRY.
   Return false if the symbols are not fully compatible and a diagnostic
   should be emitted.   

References decl::decl, type(), and types_compatible_p().

Referenced by lto_symtab_merge_decls_2().

void lto_symtab_merge_decls ( void  )
Resolve and merge all symbol table chains to a prevailing decl.   

References lto_symtab_merge_decls_1(), and symtab_initialize_asm_name_hash().

static void lto_symtab_merge_decls_1 ( )
static
static void lto_symtab_merge_decls_2 ( )
static
Merge all decls in the symbol table chain to the prevailing decl and
   issue diagnostics about type mismatches.  If DIAGNOSED_P is true
   do not issue further diagnostics. 

References first, inform(), lto_symtab_merge(), types_compatible_p(), vNULL, and warning_at().

Referenced by lto_symtab_merge_decls_1().

static void lto_symtab_merge_symbols_1 ( )
static
Helper to process the decl chain for the symbol table entry *SLOT.   

References cgraph(), dyn_cast(), lto_cgraph_replace_node(), lto_symtab_symbol_p(), lto_varpool_replace_node(), and varpool().

Referenced by lto_symtab_merge_symbols().

tree lto_symtab_prevailing_decl ( )
Given the decl DECL, return the prevailing decl with the same name.  

References is_builtin_fn(), and symtab_node_for_asm().

static bool lto_symtab_resolve_can_prevail_p ( )
static
Return true if the symtab entry E can be the prevailing one.   

References lto_symtab_symbol_p().

Referenced by lto_symtab_resolve_symbols().

static bool lto_symtab_resolve_replaceable_p ( )
static
Return true if the symtab entry E can be replaced by another symtab
   entry.   

Referenced by lto_symtab_resolve_symbols().

static symtab_node lto_symtab_resolve_symbols ( )
static
Resolve the symbol with the candidates in the chain *SLOT and store
   their resolutions.   

References error_at(), fatal_error(), inform(), lto_symtab_resolve_can_prevail_p(), lto_symtab_resolve_replaceable_p(), lto_symtab_symbol_p(), and tree_int_cst_lt().

Referenced by lto_symtab_merge_decls_1().

static bool lto_symtab_symbol_p ( )
static
Return true, if the symbol E should be resolved by lto-symtab.
   Those are all external symbols and all real symbols that are not static (we
   handle renaming of static later in partitioning).   

References symtab_real_symbol_p().

Referenced by lto_symtab_merge_decls_1(), lto_symtab_merge_symbols(), lto_symtab_merge_symbols_1(), lto_symtab_resolve_can_prevail_p(), and lto_symtab_resolve_symbols().

static void lto_varpool_replace_node ( struct varpool_node vnode,
struct varpool_node prevailing_node 
)
static
Replace the cgraph node NODE with PREVAILING_NODE in the cgraph, merging
   all edges and removing the old node.   

References symtab_node_base::analyzed, symtab_node_base::decl, symtab_node_base::definition, ipa_clone_referring(), symtab_node_base::ref_list, varpool_node::symbol, and varpool_remove_node().

Referenced by lto_symtab_merge_symbols_1().


Variable Documentation

vec<tree, va_gc>* lto_global_var_decls
@verbatim LTO symbol table.

Copyright (C) 2009-2013 Free Software Foundation, Inc. Contributed by CodeSourcery, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

Vector to keep track of external variables we've seen so far.