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]

dumping the tree


Hello,
I am working on a research project in which I want to export a whole
syntax/semantic tree of a c++ program from the compiler. My current
solution is to use the -fdump-tree-all option and take the *.t00.tu
files (translation unit dump). I've hacked the gcc/tree-dump.c so the
exported graph is in a machine-readable xml file.
This all works quite well in gcc 4.1.0. But I've hit a problem with
gcc 4.2 and newer - the dump now doesn't contain any function bodies.
Specificaly, in tree-dump.c::dequeue_and_dump() there is
    case FUNCTION_DECL:
	...
	dump_child ("body", DECL_SAVED_TREE (t));
where 't' points to the FUNCTION_DECL tree. It seems that
DECL_SAVED_TREE(t) is always NULL in gcc >= 4.2.
Practically I am only interested in the gimple cfg and its basic
blocks, which I used to get via DECL_STRUCT_FUNCTION(t) - but that
doesn't work now either. Working copy of my patches is available for
your reference at http://necago.ic.cz/prj/scc/


-- 
Infinite diversity in infinite combinations (IDIC).


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