From beginner: What is the workload of writing a RTL expander for a new IR?

Diego Novillo dnovillo@redhat.com
Thu Dec 18 16:55:00 GMT 2003


On Wed, 2003-12-17 at 21:40, Chunhua Liao wrote:
>   I notice that there are several projects aiming at improve the 
> optimization infrastructure of GCC. And it seems all of them involve 
> introducing new IR(s) between the original tree representation and RTL, thus 
> new RTL expanders are necessary for them.
>   My questions are:
> 1. Is RTL a complete representation for whole translation-unit(a complete 
> input sourcefile contains) which can be used for code generator without the 
> help from tree representation?
>
No.

>    If yes, why did I found some tree references even at the very back end?
>
Precisely for that reason.

> 2. What is the workload(in terms of n persons m months) of writing such new 
> RTL expander from a new IR? My current understanding is that it is 
> non-trival, since GCC calls several levels of functions to expand a function 
> in tree to a sequence of RTL instruction nodes and most of them contain 
> parameters in tree type. We may need rewrite them with the  parameters of 
> new IR type?
>
I'd say more than year.  Assuming that you have a good working knowledge
of GCC internals to begin with.


Diego.



More information about the Gcc mailing list