[GCC front end] add new TREE CODE

Andi Hellmund mail@andihellmund.com
Mon Feb 21 14:27:00 GMT 2011


>
> Ian said in his response that if my language is very different than C I should
> not use trees. Have you any idea of what I can use instead ?
>
>    
Hey Asma,

I'm not sure what Ian meant in detail, but I think that he wanted to say 
that you then shouldn't possibly use the TREE codes and 
tree-representation of GCC, but to use whatever intermediate 
representation is appropriate for your needs. If you would look up the 
literature, you would find tree-based structures as dominant 
intermediate structure, but most of these books then refer to 
C-syntax-like languages. Though, it is generally hard to predict which 
structure perfectly matches your needs. As said, you could use whatever 
you want. All you need to make sure is to finally translate to GIMPLE at 
some point.
> I look at the ghdl front end and I did not find vhdl-tree.def to see if they
> defined a new tree code for this fe.
>    
This file is not mandatory, I think. So, if they don't use one, they 
might not use additional tree codes. Well, if they use GENERC/tree-based 
IR at all!

Best regards,
Andi



More information about the Gcc-help mailing list