diff options
author | Jan Hubicka <jh@suse.cz> | 2011-06-10 18:48:55 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2011-06-10 16:48:55 +0000 |
commit | c8246dbe68d05cd08cf601113586d4101197af73 (patch) | |
tree | 6e4ded18f39289785bbbf684a6315fcc74722d06 /gcc | |
parent | d7e2a1c13835e77ea0e8b380f8502c3377dd724e (diff) | |
download | gcc-c8246dbe68d05cd08cf601113586d4101197af73.zip gcc-c8246dbe68d05cd08cf601113586d4101197af73.tar.gz gcc-c8246dbe68d05cd08cf601113586d4101197af73.tar.bz2 |
ipa-prop.c (ipa_write_node_info): Stream jump functions for indirect calls.
* ipa-prop.c (ipa_write_node_info): Stream jump functions for indirect
calls.
(ipa_read_node_info): Likewise.
From-SVN: r174915
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-prop.c | 25 |
2 files changed, 29 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7ed5cc6..b4fc4b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-06-10 Jan Hubicka <jh@suse.cz> + + * ipa-prop.c (ipa_write_node_info): Stream jump functions for indirect + calls. + (ipa_read_node_info): Likewise. + 2011-06-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR lto/49302 diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 6450e81..c4eccbc 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2833,7 +2833,15 @@ ipa_write_node_info (struct output_block *ob, struct cgraph_node *node) ipa_write_jump_function (ob, ipa_get_ith_jump_func (args, j)); } for (e = node->indirect_calls; e; e = e->next_callee) - ipa_write_indirect_edge_info (ob, e); + { + struct ipa_edge_args *args = IPA_EDGE_REF (e); + + lto_output_uleb128_stream (ob->main_stream, + ipa_get_cs_argument_count (args)); + for (j = 0; j < ipa_get_cs_argument_count (args); j++) + ipa_write_jump_function (ob, ipa_get_ith_jump_func (args, j)); + ipa_write_indirect_edge_info (ob, e); + } } /* Stream in NODE info from IB. */ @@ -2871,7 +2879,20 @@ ipa_read_node_info (struct lto_input_block *ib, struct cgraph_node *node, ipa_read_jump_function (ib, ipa_get_ith_jump_func (args, k), data_in); } for (e = node->indirect_calls; e; e = e->next_callee) - ipa_read_indirect_edge_info (ib, data_in, e); + { + struct ipa_edge_args *args = IPA_EDGE_REF (e); + int count = lto_input_uleb128 (ib); + + ipa_set_cs_argument_count (args, count); + if (count) + { + args->jump_functions = ggc_alloc_cleared_vec_ipa_jump_func + (ipa_get_cs_argument_count (args)); + for (k = 0; k < ipa_get_cs_argument_count (args); k++) + ipa_read_jump_function (ib, ipa_get_ith_jump_func (args, k), data_in); + } + ipa_read_indirect_edge_info (ib, data_in, e); + } } /* Write jump functions for nodes in SET. */ |