Re: [PATCH] Make cgraph_preserve_function_body_p accept a node instead of decl

2011-04-28 Thread Jan Hubicka
> > I have bootstrapped and tested the patch on x86_64-linux without > > problems.  OK for trunk? > > An alias shouldn't have a body, so why not assert !node->same_body_alias > instead.? Yep, patch is OK with that change. Honza

Re: [PATCH] Make cgraph_preserve_function_body_p accept a node instead of decl

2011-04-28 Thread Martin Jambor
Hi, On Thu, Apr 28, 2011 at 03:39:11PM +0200, Richard Guenther wrote: > On Thu, Apr 28, 2011 at 3:31 PM, Martin Jambor wrote: > > Hi, > > > > when I was removing the cgraph_node function I noticed that > > cgraph_preserve_function_body_p takes a tree decl parameter which it > > immediately conver

Re: [PATCH] Make cgraph_preserve_function_body_p accept a node instead of decl

2011-04-28 Thread Richard Guenther
On Thu, Apr 28, 2011 at 3:31 PM, Martin Jambor wrote: > Hi, > > when I was removing the cgraph_node function I noticed that > cgraph_preserve_function_body_p takes a tree decl parameter which it > immediately converts to a call graph node while its two callers get > the decl from a node they alrea

[PATCH] Make cgraph_preserve_function_body_p accept a node instead of decl

2011-04-28 Thread Martin Jambor
Hi, when I was removing the cgraph_node function I noticed that cgraph_preserve_function_body_p takes a tree decl parameter which it immediately converts to a call graph node while its two callers get the decl from a node they already have. This seems wasteful and so the patch below changes the p