This is the mail archive of the gcc-patches@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]

Re: [PATCH, PR 46984] Move thunk_delta from cgraph_indirect_call_info to cgraph_edge


On Mon, Dec 27, 2010 at 01:39:43AM +0100, Jan Hubicka wrote:
> > I guess that I'd have to add a vector of edges to lto_cgraph_encoder_d
> > and to input_cgraph, input_cgraph_opt_summary and its callees.  Hardly
> > something to be pre-approved :-)
> > 
> > I've already written some of this but before I finish it, test it and
> > re-post, I'd like to ask you to re-consider.  If we ever build call
> > graph edges for calls to thunks (especially as we plan to be able to
> > do it when building the graph), such thunk information would become an
> > integral part of an edge, without which the edge has an invalid
> > meaning.  I'd therefore not consider this an "optimization"
> > information in the sense that it is somehow optional (unlike
> > args_to_skip or tree_map which we can ignore without miscompiling).
> > 
> > Or do I somehow misunderstand the intended meaning of the cgraphopt
> > section?
> 
> Well, cgraphopt stands for cgraph optimization summary that is everything
> streamed down from wpa to ltrans but not from lgen to wpa.
> I see that we might want to store thunk info on edges to represent the
> direct calls to thunks, but this opens another cam of worms since what
> is thunk in one unit don't need to be tunk in another. So I think we rather
> want to lower the calls...

Fair enough.  However, if we try to lower the calls to thunks up
front, we might actually want to keep the thunk_delta field in
cgraph_indirect_call_info in order to save memory for the vast
majority of call graph edges that have nothing to do with thunks (but
still convert it to HOST_WIDE_INT and stream as such in cgraphopt).

I'll continue working on this along these lines then.  Thanks,

Martin


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