This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help solicited: technical documentations on GCC
- From: Jim Wilson <wilson at tuliptree dot org>
- To: Lih-der Wang <r91921085 at ntu dot edu dot tw>
- Cc: Wang Farn <farn at cc dot ee dot ntu dot edu dot tw>, gcc at gcc dot gnu dot org
- Date: Sat, 14 Jun 2003 13:11:11 -0700
- Subject: Re: Help solicited: technical documentations on GCC
- References: <004501c3316b$aa444b50$0201a8c0@Lihder>
Lih-der Wang wrote:
> We will appreciate it very much if
> anyone can tell us where to find documentation on the
> variables and data-structures used in the GCC parser?
The best documentation is the source itself, but there is also some
internals documentation in the gcc/doc directory.
The GCC design does not make it easy to use parts of gcc in other
programs. So there is no easy way to connect the GCC parser to some
other program. This is partly because of FSF policy. In an attempt to
prevent people from linking non-GPL code into gcc, some of the
interfaces are deliberately obscure. Thus it is usually easier to build
features into gcc.
The gcc front ends to do not create RTL. They create trees, which is an
AST level IL. These trees are then converted to RTL by the middle end.
The back ends then convert RTL to assembly language. Depending on what
you are trying to do, you might consider writing a back end that emits
your designed output form instead of assembly language.
You might also try looking at the tree-ssa branch. This has cleaner
interfaces than current gcc sources, and it might be easier to do what
you need here. This is an experimental branch though, so it may be less
stable than the mainline gcc sources.
Jim