I want to make a compiled language. I am currently evaluating backends. So far I am looking at C because of its speed of execution, compiling, and a small, easy to use compiler called TCC.
Having read the discussions here about using it as an intermediate language, I am trying to think about how to make it compatible with garbage collection, and handling exceptions. So far, I think I can solve both, but with much overhead.
Here are some of my thoughts on the other possible backends:
Can any of you change my mind or have more to add to this list?
Edit
I've been experimenting with LLVM recently. I found out that they have precompiled binaries and that it is possible to compile to native assembly.
http://www.antlr.org/wiki/display/CS652/Generating+machine+executable+binaries+with+LLVM
Here are the steps:
Have you considered writing a frontend for GCC? I mention this for completeness’ sake only – as far as I know the backend interface is quite complicated and the codebase is huge and hard to comprehend.
On the other hand, GCC is a mature product with many expert programmers working on it. At the very least, it probably provides the most solid basis of all the alternatives.
Personally, I would prefer LLVM (exciting architecture) or .NET’s IL: very, very easy to use, has great tool support (Reflector, Cecil, Reflexil and last but not least, the .NET reflection API) and two very efficient implementations (namely Microsoft’s canonical implementation and Mono).
But I can’t claim expertise in any of the architectures so take this answer with a grain of salt.