Dmitry Stogov
a75c6d5fb2
Skip "useless" SSA variables for INIT_ARRAY, ADD_ARRAY_ELEMENT, FE_RESET_R
2015-12-22 17:35:08 +03:00
Dmitry Stogov
b4b6d58990
Add ability to prevent "useless" SSA variable creation for "refcounting inference".
2015-12-22 16:43:37 +03:00
Dmitry Stogov
83cd828469
Make RC1/RCN inference more accurate (it's probably not 100% correct anyway)
2015-12-22 15:35:17 +03:00
Dmitry Stogov
d952eb753c
Get rid of MAY_BE_DEF
2015-12-21 19:46:55 +03:00
Dmitry Stogov
ae303cf82f
Split MAY_BE_NULL from MAY_BE_UNDEF
2015-12-21 18:39:24 +03:00
Nikita Popov
88eae43ff9
Remove uses of VARs in extended_value
...
The DECLARE_(ANON_)INHERITED_CLASS(_DELAYED) opcodes were
referencing the parent ce VAR through extended_value. This is
hacky and we can't track the def-use chain in SSA.
To avoid this, the layout of declaration opcodes is changed
as follows: op1 points to the lcname and rtd_key literals, in
that order. (For anon/lambda declarations only one of lcname or
rtd_key is present.) This frees up op2, which is now used to
reference the parent ce VAR in inheriting declarations. The
jmp offset for anon class declarations is moved frop op2 to
extended_value.
The changes were applied both to class and function declarations
to keep everything symmetric.
2015-12-21 14:44:42 +01:00
Nikita Popov
420ff42bc0
Protect against overflows in pi constraints
2015-12-20 12:56:05 +01:00
Nikita Popov
0da1378a88
long -> zend_long in range inference
2015-12-20 00:06:12 +01:00
Nikita Popov
549d7d4876
Fix Pi constraint for -LONG_MIN adjustments
...
-LONG_MIN == LONG_MIN so bad things will happen.
Example of JIT miscompile:
function test($n) {
if ($n + PHP_INT_MIN == 0) {
$n2 = (int) ($n + PHP_INT_MAX);
var_dump($n2);
}
}
test(PHP_INT_MAX + 1);
2015-12-20 00:06:12 +01:00
Nikita Popov
c9ea8fef96
Extrace find_adjusted_tmp_var() function
...
This code was duplicated for op1 and op2
2015-12-20 00:06:12 +01:00
Nikita Popov
fc68094497
Simplify bf/bt computation in pi placement
...
The meaning of the successors is well-defined, no need to check it.
2015-12-20 00:03:52 +01:00
Nikita Popov
d7424a5b04
Fix typo in pi placement
2015-12-20 00:03:52 +01:00
Nikita Popov
7cc3089d8f
Clone cannot return reference
2015-12-18 17:37:13 +01:00
Nikita Popov
8ca21876e1
Fix zend_get_func_info()
2015-12-18 17:37:13 +01:00
Dmitry Stogov
8136e4572e
Fixed dump format
2015-12-18 17:18:13 +03:00
Dmitry Stogov
f9b5345a98
Fixed compilation
2015-12-18 16:53:31 +03:00
Xinchen Hui
af871f61dc
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Improved fix for #71127
2015-12-18 17:42:11 +08:00
Xinchen Hui
2f47e9872e
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Improved fix for #71127
Conflicts:
ext/opcache/Optimizer/pass1_5.c
2015-12-18 17:41:42 +08:00
Xinchen Hui
40702799b5
Improved fix for #71127
2015-12-18 17:37:40 +08:00
Xinchen Hui
d8fc37693a
Merge branch 'PHP-7.0'
2015-12-17 14:32:17 +08:00
Xinchen Hui
9374977d21
Merge branch 'PHP-5.6' into PHP-7.0
...
Conflicts:
ext/opcache/Optimizer/pass1_5.c
2015-12-17 14:30:00 +08:00
Xinchen Hui
940c68b55d
Fixed bug #71127 (Define in auto_prepend_file is overwrite)
2015-12-17 14:27:33 +08:00
Dmitry Stogov
74daa98974
Added simple DFA optimisation pattern (just to prove the concept)
2015-12-16 13:14:31 +03:00
Dmitry Stogov
9044f491cc
Use do_alloca() instead of alloca()
2015-12-16 04:59:05 +03:00
Dmitry Stogov
e797871319
Fallbuck to simple dump format if CFG wasn't constructed
2015-12-16 04:57:51 +03:00
Dmitry Stogov
c88ffa9a56
Added e-SSA based DFA optimisation framework (incomplete)
2015-12-16 00:49:44 +03:00
Sebastian Bergmann
29a2c64339
Fugbix typo
2015-12-15 09:16:46 +01:00
Bob Weinand
6694ecdb9d
Fix live_range updates on ZEND(_FE)_FREE opcodes in block_pass
2015-12-14 23:40:28 +01:00
Rasmus Lerdorf
a63f33b282
Support uwsgi sapi in opcache
2015-12-14 06:11:00 -08:00
Rasmus Lerdorf
56bf10f0bd
Support uwsgi sapi in opcache
2015-12-14 06:10:26 -08:00
Rasmus Lerdorf
9a31d70845
Support uwsgi sapi in opcache
2015-12-14 06:09:17 -08:00
Nikita Popov
d5597fa01f
Merge branch 'PHP-7.0'
2015-12-14 00:29:57 +01:00
Nikita Popov
7dc5bc5063
Do not swap operands in array addition
...
As we support constant array operands nowadays, the original check
didn't work anymore.
2015-12-14 00:29:05 +01:00
Anatol Belski
157d0372e0
backported 7c981192eb
from 7.0
...
the way it doesn't hurt BC
2015-12-11 17:39:57 +01:00
Dmitry Stogov
1fdb63fbd9
ws fixes
2015-12-11 17:40:23 +03:00
Dmitry Stogov
21ba287c3c
dos2unix
2015-12-11 17:29:42 +03:00
Dmitry Stogov
f243aaf985
Added e-SSA based DFA optimisation framework (incomplete)
2015-12-11 17:24:55 +03:00
Dmitry Stogov
061a90f8d1
Describe special meaning of IS_UNUSED oprerand
2015-12-11 02:31:28 +03:00
Dmitry Stogov
dc36810993
Use more compact description encoding schema to free some bits
2015-12-11 01:45:26 +03:00
Dmitry Stogov
cba1a8498c
Improve Optimizer debugging facility (print the meaning of extended_value)
2015-12-11 00:47:02 +03:00
Nikita Popov
3d4a2d2002
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
2015-12-10 18:24:29 +01:00
Nikita Popov
798d168d73
Make update_opN_const implementation symmetric
...
So the main structure is the same...
2015-12-10 18:18:10 +01:00
Nikita Popov
37f3425263
Fix Foo::${42} and similar
...
Fixes segfault on direct use, segfault on opcache evaluated use,
leak on temporary use.
Fixes analogeous segfault for ${42} on opcache eval as well.
2015-12-10 18:14:40 +01:00
Dmitry Stogov
3b5c844757
Initialize bitset before processing the seconf BB (we skip the first one)
2015-12-10 11:29:53 +03:00
Dmitry Stogov
fd20e6cee6
Apply local optimizatons to extended bacic block (this allows some optimizarions across few following BBs).
2015-12-10 01:17:35 +03:00
Dmitry Stogov
7fd7734e58
Explain the disabled optimization pattern
2015-12-09 22:22:07 +03:00
Dmitry Stogov
4fd30c9565
Improve debugging of non-local variables
2015-12-09 17:21:57 +03:00
Dmitry Stogov
d2597ad20b
Improved optimizer dubugging facility
2015-12-09 14:52:00 +03:00
Dmitry Stogov
78fb8118ec
Merge branch 'PHP-7.0'
...
* PHP-7.0:
More verbose error messages
2015-12-09 13:35:31 +03:00
Dmitry Stogov
4b16082e94
More verbose error messages
2015-12-09 13:34:45 +03:00