3 ms·
It looks like you use LLVM as a backend - it seems to be the norm these days. What drove you to use it, and what has been your experience with it?
by swsieber 9y ago
It looks like you use LLVM as a backend - it seems to be the norm these days. What drove you to use it, and what has been your experience with it?
- jfecher 9y agoI decided to use it largely because of its proven track record, optimization passes, and its ability to act as a JIT compiler. LLVM is very competitive with other compiler's backends in terms of speed (see clang and gcc), and it is well established so there is plenty of help and documentation available. The builtin optimization passes means I can spend more time on the language itself rather than the IR, and the JIT, while not the fastest, is usable as is, and is extensible should I need it. Compared to using C as an intermediate language I would say there is a slight learning curve, but overall I found llvm easy to learn. One of the only disadvantages is that because llvm is so large it requires some odd build steps that can be a pain to setup, especially on windows. The llvm-config tool however, manages many of required flags for you. Also, because there are so many libraries, compilation of the compiler itself can be rather slow.