Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What thing I will need for creating a front end for Python based on LLVM architecture?

I'm new to compiler design. I know the basics of compiler design. I want to develop a frond end which take a python program as input and using LLVM libraries and LLVM JIT compiler produces an output. Can some one please point me in right direction or provide some link for reading? What are the basic blocks I have to code to do this?

Edit: I chose this as my project. I have almost two and a half month to implement this. I want to implement this for a small subset of python.

like image 298
Prashant Bhardwaj Avatar asked Feb 13 '12 09:02

Prashant Bhardwaj


1 Answers

You could recompile python bytecode, then you can keep python syntax. i.e. language frontend as it is. If you wanted great improvement, you may have to change libpython.

Look at pyastra and pymite projects, they do a subset of python and native execution.

Cython can be useful as half-way between python and compilation.

On the larger scale, look at PyPy, Psyco and Unladen Swallow.

like image 166
Dima Tisnek Avatar answered Oct 12 '22 22:10

Dima Tisnek