From: Jan Hubicka <hubicka@ucw.cz>
To: gcc-patches@gcc.gnu.org, mjambor@suse.cz
Subject: Cgraph alias reorg 11/14 (stream indirect call jump functions)
Date: Fri, 10 Jun 2011 16:06:00 -0000 [thread overview]
Message-ID: <20110610155308.GH28776@kam.mff.cuni.cz> (raw)
Hi,
this patch fixes omission I noticed while debugging unrelated problem. While
we compute jump functions for indirect calls (so they can possibly be used after
the indirect calls become direct) we forget to stream them.
Fixed thus. Regtested/bootstrapped x86_64-linux, will commit it shortly.
Honza
* ipa-prop.c (ipa_write_node_info): Stream jump functions for indirect
calls.
(ipa_read_node_info): Likewise.
Index: ipa-prop.c
===================================================================
*** ipa-prop.c (revision 174911)
--- ipa-prop.c (working copy)
*************** ipa_write_node_info (struct output_block
*** 2833,2839 ****
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);
}
/* Stream in NODE info from IB. */
--- 2833,2847 ----
ipa_write_jump_function (ob, ipa_get_ith_jump_func (args, j));
}
for (e = node->indirect_calls; e; e = e->next_callee)
! {
! 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. */
*************** ipa_read_node_info (struct lto_input_blo
*** 2871,2877 ****
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);
}
/* Write jump functions for nodes in SET. */
--- 2879,2898 ----
ipa_read_jump_function (ib, ipa_get_ith_jump_func (args, k), data_in);
}
for (e = node->indirect_calls; e; e = e->next_callee)
! {
! struct ipa_edge_args *args = IPA_EDGE_REF (e);
! int count = lto_input_uleb128 (ib);
!
! ipa_set_cs_argument_count (args, count);
! if (!count)
! continue;
!
! 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. */
reply other threads:[~2011-06-10 15:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110610155308.GH28776@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=mjambor@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).