Accessing function code from CFG

Diego Novillo dnovillo@redhat.com
Fri Mar 2 15:26:00 GMT 2007


Paulo J. Matos wrote on 03/02/07 10:12:

> In an IPA pass, for each CFG node, I have a tree decl member from
> which I can access the return type, name of the function, argument
> names and its types, but I can't seem to find a way to get the
> function code. I would guess it would be a basic block list but I
> don't know where I can get it.

You need to get at the function structure from the cgraph node with 
DECL_STRUCT_FUNCTION (cgraph_node->decl).  Then you can use one of the 
CFG accessors like basic_block_info_for_function().



More information about the Gcc mailing list