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] Enhanced nested functions lowering pass


> > Yes, that's the one small function I was talking about.  My understanding
> > is that either I hack the cgraph machinery and export some internal stuff
> > or I don't hack it and keep the separation.
>
> cgraph_node (function_decl)->reachable is not internal to cgraph.

Not sure, take a look at:

/* Notify finalize_compilation_unit that given node is reachable.  */

void
cgraph_mark_reachable_node (struct cgraph_node *node)
{
  if (!node->reachable && node->local.finalized)
    {
      notice_global_symbol (node->decl);
      node->reachable = 1;
      gcc_assert (!cgraph_global_info_ready);

      node->next_needed = cgraph_nodes_queue;
      cgraph_nodes_queue = node;
    }
}

It is at least read-only.  Moreover, reachability from tree-nested's 
viewpoint would only be relative to the topmost parent node, while 
reachability from cgraphunit's viewpoint is absolute.

-- 
Eric Botcazou


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