LLVM IR to Python Compiler

code-generation, compiler-construction, converters, llvm, python

Solution

LLVM up to 3.0 provided a C backend (see `lib/Target/CBackend`) which should be a good starting point for implementing a simple Python code generator.

Problem

Is there any tool to convert the LLVM IR code to Python code? I know it is possible to convert it to Javascript (https://github.com/kripken/emscripten/wiki), to Java (http://da.vidr.cc/projects/lljvm/) and I would love to convert it to Python also. Additionaly if such tool does not exist, could you provide any information, what is the best tool to base on (maybe I should extend the emscripten with other language - Javascript and Python are similar to each other in some terms ;) )

Original source