Prashant Bhardwaj
Prashant Bhardwaj

Reputation: 1213

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.

Upvotes: 6

Views: 1335

Answers (1)

Dima Tisnek
Dima Tisnek

Reputation: 11781

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.

Upvotes: 1

Related Questions