lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Javier,

On 30 March 2017 at 13:54, Javier Guerra Giraldez <javier@guerrag.com> wrote:
> On 30 March 2017 at 13:40, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>> dmr_C (https://github.com/dibyendumajumdar/dmr_c) is an attempt to
>> create a light weight C front-end for LLVM. It is based on a project
>> called Sparse that is not as well known as Linux or Git - but was
>> created by Linus Torvalds several years ago.
>
>
> so.... what does it do?   is it like TCC but with LLVM strength?
>

I am not that familiar with TCC - though I did consider it for this
use case but the GPL license put me off.

TCC has fast compilation as its goal. The Sparse library is not
focused on compilation speed (although I think it is fast) and is also
different in that it produces an SSA IR of its own, and has an
optimization phase as well. The LLVM backend transforms the Sparse IR
to LLVM IR.

But yes I suppose that having LLVM backend means one can target many
platforms, and also benefit from further optimizations in the LLVM
backend.

I plan to build a simpler bacakend using Nanojit or Asmjit - so that
if one doesn't want the heavy weight LLVM backend then there is a
lighter weight solution. This might allow me to use this as the JIT
technology instead of LLVM for Ravi, and achieve much smaller
footprint.

Regards
Dibyendu