diff options
author | Jan Hubicka <jh@suse.cz> | 2011-10-02 14:30:50 +0000 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2011-10-02 14:30:50 +0000 |
commit | 4ac471d8bbf15b700deb2aeccdf7529a61b703e4 (patch) | |
tree | f40e1b4f38e5db0794b1f03ee8f8d26958cf4b8b /gcc/lto-streamer-out.c | |
parent | 057480876c40ccf27cd4b3bb917966663639fdc9 (diff) |
* cgraphunit.c (ipa_passes): Remove unrechable nodes.
* lto-streamer-out.c (produce_symtab): Skip unused extern declarations.
* ipa.c (cgraph_remove_unreachable_nodes): Do not assume that external
functions are reachable when address is taken.
* ipa-inline-analysis.c (reset_inline_edge_summary): New
* gcc.dg/ipa/ctor-empty-1.c: Update dump file.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@179429 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r-- | gcc/lto-streamer-out.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 317138b824d..d107b916e56 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -1407,6 +1407,15 @@ produce_symtab (struct output_block *ob, node = lto_cgraph_encoder_deref (encoder, i); if (!DECL_EXTERNAL (node->decl)) continue; + /* We keep around unused extern inlines in order to be able to inline + them indirectly or via vtables. Do not output them to symbol + table: they end up being undefined and just consume space. */ + if (!node->address_taken && !node->callers) + { + gcc_assert (node->analyzed); + gcc_assert (DECL_DECLARED_INLINE_P (node->decl)); + continue; + } if (DECL_COMDAT (node->decl) && cgraph_comdat_can_be_unshared_p (node)) continue; |