diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-05-02 14:43:35 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-05-02 14:43:35 +0000 |
commit | 34efdaf078b01a7387007c4e6bde6db86384c4b7 (patch) | |
tree | d503eaf41d085669d1481bb46ec038bc866fece6 /gcc/lto-cgraph.c | |
parent | f733cf303bcdc952c92b81dd62199a40a1f555ec (diff) | |
download | gcc-tarball-34efdaf078b01a7387007c4e6bde6db86384c4b7.tar.gz |
gcc-7.1.0gcc-7.1.0
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 95c446d069..77605f7010 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -1,7 +1,7 @@ /* Write and read the cgraph to the memory mapped representation of a .o file. - Copyright (C) 2009-2016 Free Software Foundation, Inc. + Copyright (C) 2009-2017 Free Software Foundation, Inc. Contributed by Kenneth Zadeck <zadeck@naturalbridge.com> This file is part of GCC. @@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see #include "context.h" #include "pass_manager.h" #include "ipa-utils.h" -#include "omp-low.h" +#include "omp-offload.h" #include "ipa-chkp.h" /* True when asm nodes has been output. */ @@ -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); @@ -268,6 +268,8 @@ lto_output_edge (struct lto_simple_output_block *ob, struct cgraph_edge *edge, bp_pack_value (&bp, edge->indirect_inlining_edge, 1); bp_pack_value (&bp, edge->speculative, 1); bp_pack_value (&bp, edge->call_stmt_cannot_inline_p, 1); + gcc_assert (!edge->call_stmt_cannot_inline_p + || edge->inline_failed != CIF_BODY_NOT_AVAILABLE); bp_pack_value (&bp, edge->can_throw_external, 1); bp_pack_value (&bp, edge->in_polymorphic_cdtor, 1); if (edge->indirect_unknown_callee) @@ -396,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; @@ -623,6 +626,7 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, varpool_node *node, } bp_pack_value (&bp, node->tls_model, 3); bp_pack_value (&bp, node->used_by_single_function, 1); + bp_pack_value (&bp, node->dynamically_initialized, 1); bp_pack_value (&bp, node->need_bounds_init, 1); streamer_write_bitpack (&bp); @@ -970,7 +974,7 @@ compute_ltrans_boundary (lto_symtab_encoder_t in_encoder) if (node->alias && node->analyzed) create_references (encoder, node); if (cnode - && cnode->thunk.thunk_p) + && cnode->thunk.thunk_p && !cnode->global.inlined_to) add_node_to (encoder, cnode->callees->callee, false); while (node->transparent_alias && node->analyzed) { @@ -1026,7 +1030,7 @@ output_symtab (void) { node = dyn_cast <cgraph_node *> (lto_symtab_encoder_deref (encoder, i)); if (node - && (node->thunk.thunk_p + && ((node->thunk.thunk_p && !node->global.inlined_to) || lto_symtab_encoder_in_partition_p (encoder, node))) { output_outgoing_cgraph_edges (node->callees, ob, encoder); @@ -1397,6 +1401,7 @@ input_varpool_node (struct lto_file_decl_data *file_data, node->alias_target = get_alias_symbol (node->decl); node->tls_model = (enum tls_model)bp_unpack_value (&bp, 3); node->used_by_single_function = (enum tls_model)bp_unpack_value (&bp, 1); + node->dynamically_initialized = bp_unpack_value (&bp, 1); node->need_bounds_init = bp_unpack_value (&bp, 1); group = read_identifier (ib); if (group) @@ -1864,7 +1869,9 @@ input_symtab (void) } merge_profile_summaries (file_data_vec); - get_working_sets (); + + if (!flag_auto_profile) + get_working_sets (); /* Clear out the aux field that was used to store enough state to |