diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-07-16 11:40:25 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-07-16 11:40:25 +0000 |
commit | 8cd167a5ad8baf4988e07fcbc9c9cc338c02d3d1 (patch) | |
tree | 74fd60c507288ef44ed7f786fafeecbb5df0e160 /gcc/lto-cgraph.c | |
parent | f80b5ea1605c9f9408c5aa386ba71c16d918ebbf (diff) | |
download | gcc-tarball-8cd167a5ad8baf4988e07fcbc9c9cc338c02d3d1.tar.gz |
gcc-5.2.0gcc-5.2.0
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index ac50e4bbd2..ea352f1c18 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -805,8 +805,33 @@ output_refs (lto_symtab_encoder_t encoder) { symtab_node *node = lto_symtab_encoder_deref (encoder, i); + /* IPA_REF_ALIAS and IPA_REF_CHKP references are always preserved + in the boundary. Alias node can't have other references and + can be always handled as if it's not in the boundary. */ if (!node->alias && !lto_symtab_encoder_in_partition_p (encoder, node)) - continue; + { + cgraph_node *cnode = dyn_cast <cgraph_node *> (node); + /* Output IPA_REF_CHKP reference. */ + if (cnode + && cnode->instrumented_version + && !cnode->instrumentation_clone) + { + for (int i = 0; node->iterate_reference (i, ref); i++) + if (ref->use == IPA_REF_CHKP) + { + if (lto_symtab_encoder_lookup (encoder, ref->referred) + != LCC_NOT_FOUND) + { + int nref = lto_symtab_encoder_lookup (encoder, node); + streamer_write_gcov_count_stream (ob->main_stream, 1); + streamer_write_uhwi_stream (ob->main_stream, nref); + lto_output_ref (ob, ref, encoder); + } + break; + } + } + continue; + } count = node->ref_list.nreferences (); if (count) |