On Mon Aug 25 06:28 PM, steve wrote:
Has anyone had success compiling PHP with LLVM?


I haven't tried it, here is a good summary:
http://llvm.org/devmtg/2008-08/Lopes_PHP-JIT-InTwoDays.pdf

In short, it is 'slower' but that seems to be without any caching of the
"bytecode"

So yes, we were able to make a JIT compiler for PHP, that is able to produce (and execute) binary code out of PHP scripts. It integrates nicely with the Zend VM and requires no modifications to it. The project is nowhere near completion, as caching of the code isn't implemented yet. Also, off-line compilation (i.e. producing standalone executables) is not working yet as well. There's also another project (completely unrelated and independent) that aims to compile PHP scripts to .NET bytecode (MSIL), but the approach is quite different.


That's from my research, maybe someone can correct me here.
Isn't using something like Zend Guard (converts code into opcode) then
caching the opcodes essentially JIT?

The products available out there do not produce machine code, so I wouldn't call them JIT compilers.

Nuno

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to