[PATCH] Enhanced nested functions lowering pass

Eric Botcazou ebotcazou@adacore.com
Tue Mar 21 17:01:00 GMT 2006


> > 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



More information about the Gcc-patches mailing list