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]

Re: Help solicited: technical documentations on GCC


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


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