On 2008-06-11, Kenneth Zadeck <[EMAIL PROTECTED]> wrote:

>  my sense is not to associate put this directly in the cgraph but to keep it
> as a side table that is indexed by something like the cgraph node id.   The
> reason for leaning in this direction is that "what happens in the cgraph
> stays in the cgraph", and the infomation we are talking about here is is
> only really useful for the whopr repackaging.  This is why i have resisted
> honza's wanting to associate other ipa local information in the cgraph.

What we need here is a per-function symbol table.  I don't think I
mind if we put it together with each cgraph node or in a separate
symbol table section indexed by node id.  Both seem reasonable.
Though I'm curious why you think storing it in the cgraph node
directly is not a good idea.

What each function needs to be write to this table is every symbol in
gimple_referenced_vars(fn) that is marked as is_global_var().

I suppose that this table only needs to have the references to the
table stored in DECL_SECTION on the output file.


>  We have a pass that computes this info currently, the ipa_referenced vars,

You mean pass_ipa_reference()?  But this is the pass that sets
read/written attributes from file-globals isn't it?


Diego.

Reply via email to