This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]