This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Accessing function code from CFG


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().



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]