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: 'treelang' and GCC function-at-a-time mode


On 24.12.01 01:42 +0100(+0000), Steven Bosscher wrote:
> 
> I'm trying to figure out how to write a front end that uses the
> function-at-a-time mode. I wish to learn about this so that I can
> document it and use it for the GNU Fortran 95 project.
> 
> >From what I understand so far, the idea of this mode is to use the tree
> structures that used to be the C AST as a new IR. I should try to make
> my front-end build a whole tree for each function and translate that
> tree to RTL, instead of generating and translating trees piece-by-piece
> (per statement).
So you are first generating some tree and the converting it to
gcc internal tree presentation?

> I first tried to figure out how the existing front-ends work. People
> told me to look at the C and C++ front ends, but I never did any GCC
> hacking before so even that has proved to be too difficult for me :-) 
Some pointers: Definition of trees is in tree.h and tree.def, the 
implementation in tree.c. c-parse.in is also helpful. If you are 
courageous function.c  and stmt.c might be good also...

http://members.wri.com/johnnyb/compilers/ contains lots of links
for writing a frontend for gcc. The cobol-documentation is especially 
good, though a bit dated.

If you find a solution please write some documentation and
send a link.

- Einar Karttunen


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