This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Front-end Trees
- From: "Harry Goulding" <yarrh_17 at hotmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 14 Mar 2005 13:09:04 +0000
- Subject: Front-end Trees
- Bcc:
Hi All,
I'm writing a front-end to gcc for a very simple programming language using
flex, bison and gcc.
Just wondering if its possible to print out to stdio the tree that's created
using gcc's macros.
Also i want to do some simple optimizations such as constant folding,
arithmetic simplifications.
Does anyone know where i could find some info to do this:
1) Like is it best to do them during parsing.
2) Is it better to construct the tree and then do the optimizations on the
tree (and does gcc provide some useful functions to do these optimizations
on the tree)
Cheers Harry
_________________________________________________________________
Bored at work? Chat, flirt and play with MSN Messenger - FREE download!
http://messenger.msn.co.uk/Beta/Default.aspx