arrowd
arrowd

Reputation: 34411

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.

Upvotes: 6

Views: 7091

Answers (2)

Mathieu CARBONNEAUX
Mathieu CARBONNEAUX

Reputation: 304

With llvm ir byte code you can execute php in gralvm!

Upvotes: 0

Ira Baxter
Ira Baxter

Reputation: 95392

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

Upvotes: 4

Related Questions