From ec6a1e35322a8b9b008c5fef7a8effdbf17b68eb Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 18 May 2016 09:12:46 +0200 Subject: ipa-inline-transform.c (preserve_function_body_p): Look for first non-thunk clone. * ipa-inline-transform.c (preserve_function_body_p): Look for first non-thunk clone. (save_function_body): Save into first non-thunk. * lto-cgraph.c (lto_output_edge): When streaming thunk do not look up call stmt id. (lto_output_node): Inline thunks don't need body in every partition. * lto-streamer-in.c: Do not fixup thunk clones. * cgraphclones.c (cgraph_node::create_edge_including_clone): Skip thunks. * tree-inline.c (copy_bb): Be prepared for target node to be new after folding suceeds. From-SVN: r236357 --- gcc/lto-cgraph.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/lto-cgraph.c') diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 11d440b..5cef2ba 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -259,7 +259,7 @@ lto_output_edge (struct lto_simple_output_block *ob, struct cgraph_edge *edge, streamer_write_gcov_count_stream (ob->main_stream, edge->count); bp = bitpack_create (ob->main_stream); - uid = (!gimple_has_body_p (edge->caller->decl) + uid = (!gimple_has_body_p (edge->caller->decl) || edge->caller->thunk.thunk_p ? edge->lto_stmt_uid : gimple_uid (edge->call_stmt) + 1); bp_pack_enum (&bp, cgraph_inline_failed_t, CIF_N_REASONS, edge->inline_failed); @@ -398,7 +398,8 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, boundary_p = !lto_symtab_encoder_in_partition_p (encoder, node); - if (node->analyzed && (!boundary_p || node->alias || node->thunk.thunk_p)) + if (node->analyzed && (!boundary_p || node->alias + || (node->thunk.thunk_p && !node->global.inlined_to))) tag = LTO_symtab_analyzed_node; else tag = LTO_symtab_unavail_node; -- cgit v1.1