Compiling to LLVM?

by Colin Adams (modified: 2014 May 12)

Are there any plans anywhere for compiling Eiffel to LLVM? Apart from the optimization opportunities this might give, it also implies we could write Eiffel o be run in browsers via emscripten.

  • Manu (3 years ago 12/5/2014)

    We have been studying LLVM for a while now. Recently we updated the LLVM library made by Coline Lemahieu to work against the very latest LLVM (see

    However LLVM has some serious shortcomings with portability especially Windows support is not good. Eventually, the library will improve but we cannot change our code generation if not everything we currently have is properly supported.

    • Colin Adams (3 years ago 14/5/2014)

      I wasn't thinking of replacing the C/C++ backend with LLVM, but of adding another backend.

      • Manu (3 years ago 14/5/2014)

        Once you have the LLVM backend, it seems to me that we have possibly a much better/flexible backend than the C/C++ backend. At least for finalized code. For workbench code, if we can remove the issues I've raised then we can remove the C/C++ backend, if the LLVM backend proves to be better.

  • Thomas Beale (3 years ago 12/5/2014)

    This is a very interesting idea - I just checked out the LLVM page. Surely however the other thing you mentioned cannot execute all possible LLVM structures in js? If it can, it must be voluminous code (i.e. for Eiffel source). But I guess you are thinking of short chunks of Eiffel code, so it may work just fine...

    • Colin Adams (3 years ago 14/5/2014)

      You can read the limitations for yourself (basically only single-threaded applications or MT with no shared state)

      • Colin Adams (2 years ago 18/6/2015)


        They are going further now: