> I wonder if this is worth abstracting into a callee_fn () cgraph edge
> method?

That would rather be a cgraph node method without "callee" in the name since 
we also apply it to callers, something like:

struct function *cgraph_node::cfun (void)

and the code in can_inline_edge_p would just be:

  struct function *caller_cfun = e->caller->cfun ();
  struct function *callee_cfun = callee ? callee->cfun () : NULL;

-- 
Eric Botcazou

Reply via email to