diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-18 18:19:43 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-18 18:19:43 +0000 |
commit | 3e7775f65b75bb5cf548f50c78b9a7d83b577bfa (patch) | |
tree | de940ffb13e3d6461c2a64bbad989c58632316f5 /gcc/cgraphunit.c | |
parent | 5d459527a2be28405ba9d3b8f0626299acb79b08 (diff) | |
download | gcc-3e7775f65b75bb5cf548f50c78b9a7d83b577bfa.tar.gz |
* cgraph.h (verify_symtab, verify_symtab_node, verify_symtab_base):
Declare.
* cgraphunit.c (verify_cgraph_node): Verify symtab base; do not verify
cgraph hash and same comdat groups.
(cgraph_optimize); Verify symbol table.
* ipa.c (cgraph_remove_unreachable_nodes): Verify symbol table.
(dissolve_same_comdat_group_list): Work on symtab nodes.
(function_and_variable_visibility): Dissolve variable same comdat group
lists, too.
* symtab.c: Include timevar.h
(verify_symtab_base, verify_symtab_node, verify_symtab): New functions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186578 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 7d585e6e5f9..9de423396c1 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -577,6 +577,7 @@ verify_cgraph_node (struct cgraph_node *node) return; timevar_push (TV_CGRAPH_VERIFY); + error_found |= verify_symtab_base ((symtab_node) node); for (e = node->callees; e; e = e->next_callee) if (e->aux) { @@ -663,12 +664,6 @@ verify_cgraph_node (struct cgraph_node *node) error_found = true; } - if (!cgraph_get_node (node->symbol.decl)) - { - error ("node not found in cgraph_hash"); - error_found = true; - } - if (node->clone_of) { struct cgraph_node *n; @@ -708,32 +703,6 @@ verify_cgraph_node (struct cgraph_node *node) error ("double linked list of clones corrupted"); error_found = true; } - if (node->symbol.same_comdat_group) - { - symtab_node n = node->symbol.same_comdat_group; - - if (!DECL_ONE_ONLY (n->symbol.decl)) - { - error ("non-DECL_ONE_ONLY node in a same_comdat_group list"); - error_found = true; - } - if (n == (symtab_node)node) - { - error ("node is alone in a comdat group"); - error_found = true; - } - do - { - if (!n->symbol.same_comdat_group) - { - error ("same_comdat_group is not a circular list"); - error_found = true; - break; - } - n = n->symbol.same_comdat_group; - } - while (n != (symtab_node)node); - } if (node->analyzed && node->alias) { @@ -2654,7 +2623,7 @@ cgraph_optimize (void) return; #ifdef ENABLE_CHECKING - verify_cgraph (); + verify_symtab (); #endif /* Frontend may output common variables after the unit has been finalized. @@ -2704,7 +2673,7 @@ cgraph_optimize (void) if (!quiet_flag) fprintf (stderr, "Assembling functions:\n"); #ifdef ENABLE_CHECKING - verify_cgraph (); + verify_symtab (); #endif cgraph_materialize_all_clones (); @@ -2712,7 +2681,7 @@ cgraph_optimize (void) execute_ipa_pass_list (all_late_ipa_passes); cgraph_remove_unreachable_nodes (true, dump_file); #ifdef ENABLE_CHECKING - verify_cgraph (); + verify_symtab (); #endif bitmap_obstack_release (NULL); cgraph_mark_functions_to_output (); @@ -2740,7 +2709,7 @@ cgraph_optimize (void) dump_symtab (cgraph_dump_file); } #ifdef ENABLE_CHECKING - verify_cgraph (); + verify_symtab (); /* Double check that all inline clones are gone and that all function bodies have been released from memory. */ if (!seen_error ()) |