I'm working on a compiler for a new language with a colleague. I have
described it briefly in an earlier thread (Number of compiler passes).

For now, its purpose is research, not practical use. And this research
would not require the compiler to produce anything further down the
chain than the AST + symbol-table. However, because we wanted to see
the darn thing actually produce an executable (it's more fulfilling),
we decided to generate C++ code.

We're now finished with the translator, and I'm happy to say that it works
as expected. Of course, the research continues.

However, I have plans to turn this project into a 'real' compiler
somewhere down the line. And that means abandoning the C++ translation
and using a real intermediate language and back-end, so we can
generate more efficient code.

I would like your opinions on which existing IL to use. Or perhaps someone
could point me to a detailed comparison of ILs and back-ends.

* It should be open source, because we plan to release the compiler under
GNU GPL when it is ready.

* Our compiler is written in C++, so if there is a back-end that takes some
C/C++ structure, that might work. But I'm equally willing to use a textual
intermediate representation, which would also have various advantages.

* The language is still very limited, but we're slowly introducing the
possibility for more complex custom data-structures, so the intermediate
language should not be equally limited.

Denis Washington pointed me to LLVM, which seems a likely candidate. But I
would like to make a more informed decision.