This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cfun and current_function_decl
On Mon, Jan 18, 2010 at 2:05 PM, Paulo J. Matos <pocmatos@gmail.com> wrote:
> On Mon, Jan 18, 2010 at 12:58 PM, Richard Guenther
> <richard.guenther@gmail.com> 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 sibcall to. This
> would be easy with the tree as we would only need to walk the tree and
> find CALL_EXPR different from the one we get in the argument for the
> hook. Without the tree, I don't even know if this is possible since we
> don't have the complete RTL yet, right? Do you have any suggestion?
Look at cgraph_node (cfun->decl)->callers
Richard.
>> Richard.
>>
>
>
>
> --
> Paulo Jorge Matos - pocmatos at gmail.com
> http://www.pmatos.net
>