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]

A suggestion to make it easier to develop gcc front ends


Dear developers of gcc:

I want to make a suggestion of an improvement to gcc. The goal of this 
improvement would be making easier to develop new front-ends to gcc for
different languages. 

My idea is that the backend and the front-ends of the gcc should be clearly 
separated. The backend should be implemented as a library. Then if someone 
wants to develop a new language, he would include the apropiated headers  
(say #include <gccbackend.h>) and link with the library. 

The backend library would implement the convertion from RTL code to assembler 
code, generating debugging code and (language-independent) optimizations.

The gcc backend library should have a well-documented and (hopefully) stable 
API. So that when the gcc backends improves, we don't need to change every time 
the gcc front-ends source.

What would we get from this ?

- It would be easier to develop gcc front-ends. This surely would mean
that we will have more languages! 

- It would be easier to compile gcc. We wouldn't need the whole source
tree. Each language front-end (execpt perhaps C that is needed for 
bootstraping the compiler) would be compiled in its own, with its 
own source code tree.

- It would make gcc easier to mantain. For example, gcc developers working
in one front end (say fortran compiler), won't need to know all the 
details about the backend or the other front-ends. Also we could have
independent releases for each language, different CVS repositories for
each language, etc.

- In general, I think it is a good design practice that each program should
do one or two things, and the programs should cooperate to do more complex 
tasks (this is the over-all Unix philosophy).

I hope that you like my idea. I should confess that I don't know well the
gcc internals, perhaps there is a thecnical reason why my idea is very 
difficult to implement or it is not convenient.

Best regars,
                        Pablo De Napoli
                        (from Buenos Aires, Argentina
                        (pdenapo AT yahoo.com)  


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com


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