1

I'm asking if there are libraries that provide a specification for the IR that they require and provide programs for compiling a file containing that IR down to machine code. The reasons I don't want to use LLVM are:

  • I want to write the code that generates the IR myself.

  • Installing the LLVM development libraries is sort of a pain in the ass when I'm working on different computers.

  • I like that LLVM allows the programmer to generate the IR and not worry about compiling down to assembly, so I still want this functionality.

kjh
  • 3,407
  • 8
  • 42
  • 79
  • There are many intermediate representations and target runtimes. The most common being Java, which *many* languages uses as backend. Then there's of course .Net, also used by many languages. Both are well-documented, well-used and many of the languages (especially for the Java runtime) are open-source. – Some programmer dude Jun 30 '14 at 17:15
  • Do you mean generating the LLVM IR or any nonspecific IR? – Paweł Bylica Jun 30 '14 at 17:45

3 Answers3

1

The IR code generated by your program can be then compiled to machine code with the LLVM tool llc. No development versions of LLVM libraries are required for that.

Paweł Bylica
  • 3,780
  • 1
  • 31
  • 44
1
  • You can generate LLVM IR yourself instead of using LLVM's API. LLVM IR has a convenient text representation to enable this.

  • You can install just the LLVM binaries for processing the IR, rather than using their back-end libraries, so you don't need to get the development libraries set up.

bames53
  • 86,085
  • 15
  • 179
  • 244
0

There is libjit although it seems to have a slightly smaller application range (especially when it comes to analysis).

choeger
  • 3,562
  • 20
  • 33