Search code examples
phpllvm

Are there any PHP -> LLVM IR translators?


I need to compile PHP source to LLVM bitcode. I've tried Raven PHP (http://code.roadsend.com/rphp) and it's able to do what i want, but the project seems to be dead. So i wanted to check for some more possible projects.

After that I found phpllvm PECL extension (http://svn.php.net/viewvc/svn/pecl/llvm/). I even have almost made it to run with trunk LLVM, but after closely looking on the code, i figured, that LLVM code is being generated only when according PHP function is being executed. Unfortunately, it's not what i want.

So i wonder, if there are more projects for translating PHP to LLVM and if not - what's the best way, from your point of view, to implement such thing?

About LLVM:

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.


Solution

  • You didn't say what your goal is. If it is simply better performance and easy availablity, you might consider the HipHop PHP compiler.