Re: [patch] Work harder to find DECL_STRUCT_FUNCTION

2014-10-07 Thread Eric Botcazou
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:

Re: [patch] Work harder to find DECL_STRUCT_FUNCTION

2014-10-07 Thread Richard Biener
On Tue, Oct 7, 2014 at 9:43 AM, Eric Botcazou ebotca...@adacore.com wrote: 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

Re: [patch] Work harder to find DECL_STRUCT_FUNCTION

2014-10-07 Thread Jan Hubicka
On Mon, Oct 6, 2014 at 11:52 AM, Eric Botcazou ebotca...@adacore.com wrote: Hi, you can have chains of clone functions in the callgraph but can_inline_edge_p stops at the first clone when it is looking for DECL_STRUCT_FUNCTION, which can fool the following conditions in the

Re: [patch] Work harder to find DECL_STRUCT_FUNCTION

2014-10-06 Thread Richard Biener
On Mon, Oct 6, 2014 at 11:52 AM, Eric Botcazou ebotca...@adacore.com wrote: Hi, you can have chains of clone functions in the callgraph but can_inline_edge_p stops at the first clone when it is looking for DECL_STRUCT_FUNCTION, which can fool the following conditions in the predicate.