rfc:jit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:jit [2019/02/13 09:07] dmitryrfc:jit [2019/02/22 12:08] – Compatibility with C compilers without GCC explicit global register variables extension dmitry
Line 402: Line 402:
  
 ===== State and compatibility ===== ===== State and compatibility =====
-Currently we support only x86 and x86_64 non-ZTS builds on POSIX platforms (tested on Linux). +Currently we only support x86 and x86_64 non-ZTS builds on POSIX platforms (tested on Linux). 
-We support only "Hybrid VMthat requires C compiler with GCC extensions (labels as values and explicit global register variables)Unfortunately, LLVM doesn'support the second feature and MSVC - both.+We support "Hybrid" and "Call" VM with and without GCC explicit global register variables extension. 
 +There is no any restriction on C compiler any more. LLVM build works fine. Anatol Belski is going to work on Windows support.
  
-ZTS support is not a big problem, but it should be implemented after ZTS improvement described at [[https://wiki.php.net/zts-improvement|https://wiki.php.net/zts-improvement]]+ZTS support is doable and shouldn't be very difficult, but should be implemented once the ZTS improvements described at [[https://wiki.php.net/zts-improvement|https://wiki.php.net/zts-improvement]] are done.
  
-LLVM and MSVC are not supported yetWithout JIT, bench.php is about 2 times faster on PHP built with GCC, then with LLVM or MSVC. LLVM and MSVC reqiure support for "Call VM" (it's implemented, but wasn't tested for a while) and additional code for opcode handlers argument passing and FP/IP register reloading (to emulate register variables and reuse existing code-generator). Windows support might also require adoption to different calling convention+Windows is not currently supported. At least 64-bit Windows implementation requires adopting to different calling convention.
- +
-Alternative way to support all platforms and C compilers is generating low-level VM (using the same JIT framework). This VM won't depend on C compiler extensions, and going to be comptible with JIT out of the box. As a side effect, interpretation should also became faster. This approach is used in JVM template VM, low level WebKit interpreter, V8 ignition interpreter, LuaJIT interpreter. Low-level VM may be implemented in PHP-8, in addition to existing interpreter written in C.+
  
 ===== Open Issues ===== ===== Open Issues =====
rfc/jit.txt · Last modified: 2020/08/01 23:41 by carusogabriel