[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Starting a JIT backend for Ravi yet again
- From: Sean Conner <sean@...>
- Date: Wed, 13 Sep 2017 15:49:58 -0400
It was thus said that the Great Dibyendu Majumdar once stated:
> After implementing JIT backends using LLVM and libgccjit, now it is
> time to try again!
> LLVM is great at generating high performance machine code, but the
> trouble with LLVM is that it is a huge beast. gcc's JIT library still
> uses intermediate files for compilation ... so it is a JIT in name
> I have been trying to figure out a way to create a small JIT backend
> that trades size for performance. Additionally, writing the backend in
> IR is tedious and errorprone, so it would be better if the backend
> could be written in a language such as C.
What's wrong with using DynASM from LuaJIT? That might be a good place to
start. There's also TCC (Tiny C compiler) which can be used as a library to
compile C code directly into memory, but the license is LGPL. I have two
modules that wraps up TCC  that you can look at though.