summaryrefslogtreecommitdiff
path: root/ext/opcache/jit/zend_jit_trace.c
Commit message (Collapse)AuthorAgeFilesLines
* Improved JIT for TYPE_CHECK opcodeDmitry Stogov2021-03-251-0/+14
|
* Move x86 dependent code out from platform independed parts.Dmitry Stogov2021-03-231-8/+8
|
* Support prototypes in call graphNikita Popov2021-03-191-1/+2
| | | | | | | | | | Even if we don't know the exact method being called, include it in the call graph with the is_prototype flag. In particular, we can still make use of return types from prototype methods, as PHP 8 makes LSP violations a hard error. Most other places are adjusted to skip calls with !is_prototype. Maybe some of them would be fine, but ignoring them is conservative.
* Merge branch 'PHP-8.0'Dmitry Stogov2021-02-171-9/+24
|\ | | | | | | | | * PHP-8.0: Fixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in code involving bitshifts)
| * Fixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in ↵Dmitry Stogov2021-02-171-9/+24
| | | | | | | | code involving bitshifts)
* | Optimize ZEND_COUNT opcodes on arrays in the jitTyson Andre2021-02-091-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid the overhead of a call and checking types when the argument is definitely an array. Avoid the overhead of gc when `__destruct` won't get called. This seemed cheap enough to check for in the jit. Because of https://wiki.php.net/rfc/restrict_globals_usage we can be sure in the ZEND_COUNT handler that the array count does not have to be recomputed in php 8.1. The below example took 0.854 seconds before the optimization, and 0.564 seconds after the optimization, giving the same result ```php <?php /** @jit */ function bench_count(int $n): int { $total = 0; $arr = []; for ($i = 0; $i < $n; $i++) { $arr[] = $i; $total += count($arr); } return $total; } function main() { $n = 1000; $iterations = 50000; $start = microtime(true); $result = 0; for ($i = 0; $i < $iterations; $i++) { $result += bench_count($n); } $elapsed = microtime(true) - $start; printf("Total for n=%d, iterations=%d = %d, elapsed=%.3f\n", $n, $iterations, $result, $elapsed); } main(); ``` Before ```asm mov $0x7feb8cf8a858, %r15 mov $ZEND_COUNT_SPEC_CV_UNUSED_HANDLER, %rax call *%rax ``` After ```asm mov 0x70(%r14), %rdi - Copy the count from the `zend_array*` pointer mov %rdi, (%rax) - Store the count in the destination's value mov $0x4, 0x8(%rax) - Store IS_LONG(4) in the destination's type ``` And add tracing jit support Closes GH-5584
* | Replace zend_bool uses with boolNikita Popov2021-01-151-26/+26
|/ | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Fixed bug #80422 (php_opcache.dll crashes when using Apache 2.4 with JIT)Dmitry Stogov2021-01-141-0/+5
|
* Add guard if lvalue of assignment may be a reference, but wasn't a reference ↵Dmitry Stogov2021-01-111-0/+5
| | | | during recording
* Eliminate redundand comparison insructionsDmitry Stogov2020-12-241-6/+100
|
* Eliminate some repeatable IS_REFERENCE checksDmitry Stogov2020-12-101-15/+47
|
* Perform early guard type check for result of FETCH_CONSTANTDmitry Stogov2020-12-091-1/+1
|
* Bug #80447 (Strange out of memory error when running with JIT)Dmitry Stogov2020-12-011-1/+1
|
* Fixed "may be used uninitialized" compilation warningsDmitry Stogov2020-11-301-0/+3
|
* Eliminate deafd storesDmitry Stogov2020-11-261-4/+28
|
* Fixed use-after-free in PHPUnit testsDmitry Stogov2020-11-231-0/+3
|
* Fixed incorrect TRACE_FRAME_MASK_NESTED flag settingDmitry Stogov2020-11-201-1/+7
|
* Added missing deoptimization code for trampoline handlingDmitry Stogov2020-11-191-0/+6
|
* Fixed trampoline handlingDmitry Stogov2020-11-171-7/+18
|
* Fixed alias handlingDmitry Stogov2020-11-161-11/+24
|
* Fixed incorrect FETCH_THIS optimizationDmitry Stogov2020-11-161-1/+1
|
* Trampoline cleanupDmitry Stogov2020-11-161-3/+13
|
* Fixed incorrectly eliminated type storeDmitry Stogov2020-11-111-18/+18
|
* Remove assertionDmitry Stogov2020-11-111-1/+2
|
* Fixed incorrect invariant guard motionDmitry Stogov2020-11-111-1/+2
|
* Fixed reference-counting propagationDmitry Stogov2020-11-111-0/+3
|
* Fixed missaligned accessDmitry Stogov2020-11-091-2/+2
|
* Move stack overflow checks out of the loopsDmitry Stogov2020-11-061-4/+62
|
* Fixed incorrect invariant guard motionDmitry Stogov2020-11-051-1/+3
|
* Create TSSA loops for recursive call/return traces and move invariant type ↵Dmitry Stogov2020-10-301-30/+117
| | | | guards out of loops.
* Fixed memory leak in Zend/tests/bug78999.phptDmitry Stogov2020-10-281-4/+4
|
* Fixed tracing JIT support for aliasses (Zend/tests/bug75420.13.phpt and ↵Dmitry Stogov2020-10-271-7/+19
| | | | ext/standard/tests/streams/bug60106.phpt)
* Fixed support for named parameters (Zend/tests/named_params/references.phpt)Dmitry Stogov2020-10-271-22/+40
|
* Fixed tracing JIT for tests/classes/unset_properties.phptDmitry Stogov2020-10-271-13/+7
|
* Fixed memory leakDmitry Stogov2020-10-271-2/+2
|
* Better JIT support for aliasesDmitry Stogov2020-10-261-73/+133
|
* Fixed some typosJavier Eguiluz2020-10-231-2/+2
| | | | | | Closes GH-6373. [ci skip]
* Checj type guards before loading values into CPU registersDmitry Stogov2020-10-221-0/+12
|
* Avoid register allocation for ASSIGN into aliased variable (it might be ↵Dmitry Stogov2020-10-221-0/+9
| | | | indirectly changed into IS_REFERENCE)
* More accurate live range constructionDmitry Stogov2020-10-211-1/+3
|
* Improve register allocator (give preference to loop variables).Dmitry Stogov2020-10-201-0/+14
|
* Avoid refcounting when return CV (similar to optimization in VM).Dmitry Stogov2020-10-151-6/+9
|
* Avoid useless register allocationDmitry Stogov2020-10-131-0/+1
|
* Perform trace range propagationDmitry Stogov2020-10-131-0/+35
|
* Eliminate dead storesDmitry Stogov2020-10-121-5/+10
|
* Eliminate dead loadDmitry Stogov2020-10-091-1/+3
|
* Eliminate more dead type storesDmitry Stogov2020-10-091-2/+13
|
* Eliminate more dead type storesDmitry Stogov2020-10-081-14/+26
|
* Eliminate dead type storesDmitry Stogov2020-10-081-52/+88
|
* Cleanup (expand and remove simple macros)Dmitry Stogov2020-10-081-40/+25
|