Frage

I would like to generate LLVM IR for a toy language whose compiler is written in Scala.

SLEM seems to be exactly what I need but I can't figure out if it's usable in its current state. I tried to download the sources but I am unable to compile it.

Anyone used it successfully or knows whether it's usable?

War es hilfreich?

Lösung

I haven't used SLEM, but checking its commits it seems that the last one was from early 2011, so it's updated to LLVM version 2.9 at the latest. The IR has significantly changed since then, so it would probably not be usable if you try to use it with a newer LLVM.

You can update it, of course, but perhaps a better option would be LLVM-J - Java bindings to LLVM. It's updated to LLVM 3.1, in which the IR is far closer to what it is right now, plus it's basically just a wrapper around LLVM's C API, so updating it yourself should be relatively simple.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top