diff options
author | Ilya Enkovich <ilya.enkovich@intel.com> | 2015-06-03 08:29:28 +0000 |
---|---|---|
committer | Ilya Enkovich <ienkovich@gcc.gnu.org> | 2015-06-03 08:29:28 +0000 |
commit | 48de5d37c34a0d18b4f0e19e9ab3f661586ae9ee (patch) | |
tree | 2937d0650a54355694d28bd857d54e78bcd1f876 /gcc/ipa.c | |
parent | b2858c9f3ed8275a61ee02421b8fc51ab070c79e (diff) | |
download | gcc-48de5d37c34a0d18b4f0e19e9ab3f661586ae9ee.zip gcc-48de5d37c34a0d18b4f0e19e9ab3f661586ae9ee.tar.gz gcc-48de5d37c34a0d18b4f0e19e9ab3f661586ae9ee.tar.bz2 |
ipa.c (symbol_table::remove_unreachable_nodes): Don't remove instumentation thunks calling reachable functions.
gcc/
* ipa.c (symbol_table::remove_unreachable_nodes): Don't
remove instumentation thunks calling reachable functions.
* lto-cgraph.c (output_refs): Always output IPA_REF_CHKP.
* lto/lto-partition.c (privatize_symbol_name_1): New.
(privatize_symbol_name): Privatize both decl and orig_decl
names for instrumented functions.
* cgraph.c (cgraph_node::verify_node): Add transparent
alias chain check for instrumented node.
gcc/testsuite/
* gcc.dg/lto/chkp-privatize-1_0.c: New.
* gcc.dg/lto/chkp-privatize-1_1.c: New.
* gcc.dg/lto/chkp-privatize-2_0.c: New.
* gcc.dg/lto/chkp-privatize-2_1.c: New.
From-SVN: r224063
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r-- | gcc/ipa.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -476,6 +476,20 @@ symbol_table::remove_unreachable_nodes (FILE *file) if (cnode->global.inlined_to) body_needed_for_clonning.add (cnode->decl); + /* For instrumentation clones we always need original + function node for proper LTO privatization. */ + if (cnode->instrumentation_clone + && cnode->definition) + { + gcc_assert (cnode->instrumented_version || in_lto_p); + if (cnode->instrumented_version) + { + enqueue_node (cnode->instrumented_version, &first, + &reachable); + reachable.add (cnode->instrumented_version); + } + } + /* For non-inline clones, force their origins to the boundary and ensure that body is not removed. */ while (cnode->clone_of) @@ -492,7 +506,7 @@ symbol_table::remove_unreachable_nodes (FILE *file) } else if (cnode->thunk.thunk_p) enqueue_node (cnode->callees->callee, &first, &reachable); - + /* If any reachable function has simd clones, mark them as reachable as well. */ if (cnode->simd_clones) |