|AST capture in gcc firstname.lastname@example.org (2004-09-14)|
|Re: AST capture in gcc email@example.com (George Huber) (2004-09-21)|
|Re: AST capture in gcc firstname.lastname@example.org (2004-09-21)|
|Re: AST capture in gcc email@example.com (Joan Pujol) (2004-09-21)|
|From:||firstname.lastname@example.org (Steven Bosscher)|
|Date:||21 Sep 2004 22:17:34 -0400|
|Posted-Date:||21 Sep 2004 22:17:34 EDT|
email@example.com (Gregory Seront) wrote in message news:04-09-099...
> I need to capture an intermediate representation for C++ in order to
> take measurements on the code.
> I was thinking of hacking gcc in order to capture the abstract
> synthatic tree (AST) it is building.
> So I was asking myself:
> 1) do gcc produce an AST?
> 2) can I capture it?
1) From GCC 4.0 (ie. CVS HEAD) onwards, yes it does.
2) Yes you can, GCC has options to dump the AST after
every optimization pass.
Whether the dump is good enough for you depends on what measurements
you want to do. The dumps are not self contained nor compilable.
Return to the
Search the comp.compilers archives again.