This is the mail archive of the gcc-help@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: [GCC front end] add new TREE CODE


charfi asma <charfiasma@yahoo.fr> writes:

> I am developping my own gcc front end. My source language contains concepts that 
> are not represented directly in C code.
> to compile those elements, I think that I should add a new tree codes to my 
> front end as C++ does for templates...
> I think that I should also implement how to translate this new tree code in 
> Gimple.
> my question is : should I also care about how to translate those tree code al 
> over the compiler chain: gimple --> ssa --> unssa --> rtl --> ass ...
> did you suggest to follow an example of an existing front end that adds some 
> tree code cause the C++ one seems to be mature and complete.

First let me say that if your language is very different from C you
probably shouldn't be using trees at all.

But if your language is mostly like C then using trees is reasonable.
Even the C frontend itself has language-specific tree codes; see
c-family/c-common.def.  Or look at Objective C, at objc/objc-tree.def.

Ian


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