3 ms·
I think I need some guidance in understanding this project. The typical LLVM-base compiler 'stack' looks like this: [Front-end] -> [LLVM AST] -> [Back-end]
by delinka 13y ago
I think I need some guidance in understanding this project. The typical LLVM-base compiler 'stack' looks like this:
[Front-end] -> [LLVM AST] -> [Back-end]
Where the front end compiles your language of choice to LLVM's AST format, and a back-end translates AST to machine code. All the really awesome code optimization stuff happens at the AST level before the back-end gets involved.
So is ErLLVM a back-end that emits Erlang (such that any front-end language can be translated to Erlang)? Or is it an LLVM front-end that compiles Erlang to LLVM AST? An in the latter case, if LLVM already targets ARM, why does ErLLVM need to do work related to ARM?
- masklinn 13y ago> Or is it an LLVM front-end that compiles Erlang to LLVM AST? This, kind-of. It's a new HiPE[0] backend. See [1] for how LLVM integrates into the existing Erlang pipeline. [0] http://www.it.uu.se/research/group/hipe/ http://www.it.uu.se/research/group/hipe/ [1] http://erllvm.softlab.ntua.gr/documentation/design/pipeline/ http://erllvm.softlab.ntua.gr/documentation/design/pipeline/
- signa11 13y agoif you have not seen this: http://www.erlang-factory.com/upload/presentations/519/erllvm.pdf http://www.erlang-factory.com/upload/presentations/519/erllv... already, it might serve as a high-level overview of what is being attempted here ?