[GCC front end] add new TREE CODE
Ian Lance Taylor
iant@google.com
Mon Feb 14 17:48:00 GMT 2011
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
More information about the Gcc-help
mailing list