Re: cfun and current_function_decl

2010-01-18 Thread Paulo J. Matos
On Mon, Jan 18, 2010 at 1:25 PM, Richard Guenther wrote: > > Look at cgraph_node (cfun->decl)->callers > > Richard. > Exactly what I need. :) And the day looks brighter now! Thank you very much. -- Paulo Jorge Matos - pocmatos at gmail.com http://www.pmatos.net

Re: cfun and current_function_decl

2010-01-18 Thread Richard Guenther
On Mon, Jan 18, 2010 at 2:05 PM, Paulo J. Matos wrote: > On Mon, Jan 18, 2010 at 12:58 PM, Richard Guenther > wrote: >> >> Yes.  During expansion we destroy the trees. >> > > Is there a way to avoid tree destruction? Maybe through a flag? > If not, what I need is in the hook, to know if the calle

Re: cfun and current_function_decl

2010-01-18 Thread Paulo J. Matos
On Mon, Jan 18, 2010 at 12:58 PM, Richard Guenther wrote: > > Yes.  During expansion we destroy the trees. > Is there a way to avoid tree destruction? Maybe through a flag? If not, what I need is in the hook, to know if the caller, calls any other functions besides the one we are evaluating the s

Re: cfun and current_function_decl

2010-01-18 Thread Richard Guenther
On Mon, Jan 18, 2010 at 1:40 PM, Paulo J. Matos wrote: > On Mon, Jan 18, 2010 at 10:30 AM, Richard Guenther > wrote: >> On Mon, Jan 18, 2010 at 11:24 AM, Paulo J. Matos wrote: >>> Hi, >>> >>> As a continuation of my previous issue, wha

Re: cfun and current_function_decl

2010-01-18 Thread Paulo J. Matos
On Mon, Jan 18, 2010 at 10:30 AM, Richard Guenther wrote: > On Mon, Jan 18, 2010 at 11:24 AM, Paulo J. Matos wrote: >> Hi, >> >> As a continuation of my previous issue, what's the difference between >> cfun and current_function_decl and which one should

Re: cfun and current_function_decl

2010-01-18 Thread Richard Guenther
On Mon, Jan 18, 2010 at 11:24 AM, Paulo J. Matos wrote: > Hi, > > As a continuation of my previous issue, what's the difference between > cfun and current_function_decl and which one should I use to walk the > tree during TARGET_FUNCTION_OK_FOR_SIBCALL? > > [In the inter

cfun and current_function_decl

2010-01-18 Thread Paulo J. Matos
Hi, As a continuation of my previous issue, what's the difference between cfun and current_function_decl and which one should I use to walk the tree during TARGET_FUNCTION_OK_FOR_SIBCALL? [In the internals document I only found references to cfun and even there was hard to understand wh