This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to stream trees in lto-cgraph.c?
- From: Martin Jambor <mjambor at suse dot cz>
- To: GCC Mailing List <gcc at gcc dot gnu dot org>
- Cc: Diego Novillo <dnovillo at google dot com>
- Date: Tue, 29 Dec 2009 01:48:51 +0100
- Subject: How to stream trees in lto-cgraph.c?
Hi,
in order to implement all sorts of IPA-devirtualization in WHOPR, I
need to store type of OBJ_TYPE_REF_OBJECT when streaming a call graph
edge. I assume that lto_output_tree and lto_input_tree are what I
need to use. Unfortunately, I have not been really able to use neither.
The problem with lto_output_tree is that it requires a parameter of
type output_block whereas lto_output_edge only has
lto_simple_output_block at its disposal. Do I understand it correctly
that this is basically a different thing and that I need to change all
output functions to use the former? Is there any downside to it or a
pitfall that I should be aware of? Does it require any change on the
reader's side?
I also have a problem with the parameters of lto_input_tree. This
time the required lto_input_block is available but it also requires
something of the type struct data_in. I have tried to mimic the code
in ipa-prop.c (which is a bit awkward and probably easy to get wrong)
to get one but my first attempt ended in rather non-obvious segfaults.
Yes, it could not have worked because I did not solve the previous
problem but segfaulted when I tried to set the reader up, before any
actual reading, so I guess I got something else wrong here too. What
would be the easiest way to get a required data_in?
I understand it is my very limited understanding of the underling
concepts of the streaming code that results into these kinds of
problems. Is there something I could read to improve my knowledge in
this area?
Thanks a lot in advance,
Martin