|AST capture in gcc email@example.com (2004-09-14)|
|Re: AST capture in gcc firstname.lastname@example.org (George Huber) (2004-09-21)|
|Re: AST capture in gcc email@example.com (2004-09-21)|
|Re: AST capture in gcc firstname.lastname@example.org (Joan Pujol) (2004-09-21)|
|From:||email@example.com (Steven Bosscher)|
|Date:||21 Sep 2004 22:17:34 -0400|
|Posted-Date:||21 Sep 2004 22:17:34 EDT|
firstname.lastname@example.org (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.