diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2018-02-08 15:51:51 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2018-02-08 14:51:51 +0000 |
commit | 39aa9b2369eff7f2be0712ea7f1ee12f8697ce36 (patch) | |
tree | 09190fc346352b0770f0eab06a1b4031cf5bb35d /gcc/lto | |
parent | 84b4c7b593cd4ebb475a08aa4b816c722f716ce6 (diff) | |
download | gcc-39aa9b2369eff7f2be0712ea7f1ee12f8697ce36.zip gcc-39aa9b2369eff7f2be0712ea7f1ee12f8697ce36.tar.gz gcc-39aa9b2369eff7f2be0712ea7f1ee12f8697ce36.tar.bz2 |
re PR ipa/81360 (ice in estimate_edge_growth, at ipa-inline.h:86)
PR ipa/81360
* cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
* symtab.c: Include builtins.h
(symtab_node::output_to_lto_symbol_table_p): Move here
from lto-streamer-out.c:output_symbol_p.
* lto-streamer-out.c (write_symbol): Turn early exit to assert.
(output_symbol_p): Move all logic to symtab.c
(produce_symtab): Update.
* lto.c (unify_scc): Register prevailing trees, not trees to be freed.
(read_cgraph_and_symbols): Use
symtab_node::output_to_lto_symbol_table_p.
From-SVN: r257490
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/lto/lto.c | 17 |
2 files changed, 19 insertions, 5 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index bed71f3..62fec49 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,10 @@ +2018-02-08 Jan Hubicka <hubicka@ucw.cz> + + PR ipa/81360 + * lto.c (unify_scc): Register prevailing trees, not trees to be freed. + (read_cgraph_and_symbols): Use + symtab_node::output_to_lto_symbol_table_p. + 2018-01-30 Jan Hubicka <hubicka@ucw.cz> * lto.c (register_resolution): Remove forgotten sanity check. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 8c557d3..9726613 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1648,13 +1648,16 @@ unify_scc (struct data_in *data_in, unsigned from, { map2[i*2] = (tree)(uintptr_t)(from + i); map2[i*2+1] = scc->entries[i]; - lto_maybe_register_decl (data_in, scc->entries[i], from + i); } qsort (map2, len, 2 * sizeof (tree), cmp_tree); qsort (map, len, 2 * sizeof (tree), cmp_tree); for (unsigned i = 0; i < len; ++i) - streamer_tree_cache_replace_tree (cache, map[2*i], - (uintptr_t)map2[2*i]); + { + lto_maybe_register_decl (data_in, map[2*i], + (uintptr_t)map2[2*i]); + streamer_tree_cache_replace_tree (cache, map[2*i], + (uintptr_t)map2[2*i]); + } } /* Free the tree nodes from the read SCC. */ @@ -2901,8 +2904,12 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) res = snode->lto_file_data->resolution_map->get (snode->decl); if (!res || *res == LDPR_UNKNOWN) - fatal_error (input_location, "missing resolution data for %s", - IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (snode->decl))); + { + if (snode->output_to_lto_symbol_table_p ()) + fatal_error (input_location, "missing resolution data for %s", + IDENTIFIER_POINTER + (DECL_ASSEMBLER_NAME (snode->decl))); + } else snode->resolution = *res; } |