summaryrefslogtreecommitdiff
path: root/gcc/lto-cgraph.c
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-16 10:47:55 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-16 10:47:55 +0000
commit52200d03c231f0bddbd4bbc5cd3608c6a1dd4598 (patch)
treea924d04dfecfeecfc3dbb2cd245d5482ed23f090 /gcc/lto-cgraph.c
parentfc8021097ec7542658f7b035604de66387c3d50e (diff)
downloadgcc-52200d03c231f0bddbd4bbc5cd3608c6a1dd4598.tar.gz
IPA ICF pass, part 3/5
* Makefile.in: New object files included. * cgraph.c (cgraph_node::dump): New cgraph_node flag icf_merged is printed. (verify_edge_corresponds_to_fndecl): More sensitive verification of nodes that are merged by IPA ICF. * cgraph.h (cgraph_node::num_references): New function. * cgraphunit.c (cgraph_node::expand_thunk): White space fixed. * common.opt: New options ipa-icf, ipa-icf-functions and ipa-icf-variables introduced. * doc/invoke.texi: Documentation of new options introduced. * ipa-icf-gimple.c: New file. * ipa-icf-gimple.h: New file. * ipa-icf.c: New file. * ipa-icf.h: New file. * lto-cgraph.c (lto_output_node): Streaming of icf_merged flag added. (input_overwrite_node): Likewise. * lto-section-in.c: New icf section added. * lto-streamer.h (enum lto_section_type): Likewise. * opts.c (common_handle_option): New option added. * passes.def: New pass included. * timevar.def: Time variable for IPA ICF added. * tree-pass.h: New IPA ICF pass entry point added. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216305 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r--gcc/lto-cgraph.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index a48e61eb893..136fc86420e 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -540,6 +540,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node,
bp_pack_value (&bp, node->only_called_at_exit, 1);
bp_pack_value (&bp, node->tm_clone, 1);
bp_pack_value (&bp, node->calls_comdat_local, 1);
+ bp_pack_value (&bp, node->icf_merged, 1);
bp_pack_value (&bp, node->thunk.thunk_p && !boundary_p, 1);
bp_pack_enum (&bp, ld_plugin_symbol_resolution,
LDPR_NUM_KNOWN, node->resolution);
@@ -1080,6 +1081,7 @@ input_overwrite_node (struct lto_file_decl_data *file_data,
node->only_called_at_exit = bp_unpack_value (bp, 1);
node->tm_clone = bp_unpack_value (bp, 1);
node->calls_comdat_local = bp_unpack_value (bp, 1);
+ node->icf_merged = bp_unpack_value (bp, 1);
node->thunk.thunk_p = bp_unpack_value (bp, 1);
node->resolution = bp_unpack_enum (bp, ld_plugin_symbol_resolution,
LDPR_NUM_KNOWN);