History log of /PHP-8.0/ext/opcache/Optimizer/dfa_pass.c (Results 1 – 25 of 118)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 4135e601 29-Aug-2022 Dmitry Stogov

Fix memory leak

Fixes oss-fuzz #50616


# af1a7b7b 01-Aug-2022 Dmitry Stogov

Fix SSA reconstruction when body of "foreach" loop is removed

Fixes oss-fuzz #49483


# e004e844 20-Dec-2021 Dmitry Stogov

Fix incorrect optimization of ASSIGN_OP that may lead to memory leak

Fixes oss-fuzz #42506


# 0ac3d78d 09-Dec-2021 Dmitry Stogov

Fix incorrect JMP optimization

Fixes oss-fuzz #42155


# be271f27 24-Nov-2021 Nikita Popov

Fix bug #81652

We need to check not only for defs but also for uses of the
variable.


# 53df29bc 08-Nov-2021 Nikita Popov

Drop pi nodes for both old/new pred in replace_predecessor

We also need to drop pi nodes for new_pred here, as the pi node
restriction for new_pred is not necessarily true for control

Drop pi nodes for both old/new pred in replace_predecessor

We also need to drop pi nodes for new_pred here, as the pi node
restriction for new_pred is not necessarily true for control
coming from old_pred as well.

Fixes oss-fuzz #40782.

show more ...


# 6bd5271c 18-Oct-2021 Dmitry Stogov

Fixed incorrect optimization that may cause JIT assertion


# 9ebe8494 12-Oct-2021 Nikita Popov

Don't replace tmp with cv in YIELD argument

For by-ref generators, these may have different behavior.

Fixes oss-fuzz 6059739298004992.


# 038bc277 27-Sep-2021 Nikita Popov

Handle pi nodes in replace_predecessor

If we're removing a predecessor because it already exists during
replacement, we should also drop pi nodes for that predecessor.

Fixes oss

Handle pi nodes in replace_predecessor

If we're removing a predecessor because it already exists during
replacement, we should also drop pi nodes for that predecessor.

Fixes oss-fuzz #39276.

show more ...


# 5cae6b9b 09-Sep-2021 Nikita Popov

Check that POST_INC/DEC has use in DFA optimization

We'd have usually converted it into a PRE_INC if there is no use,
but that's not guaranteed. If there is no use at this point, make

Check that POST_INC/DEC has use in DFA optimization

We'd have usually converted it into a PRE_INC if there is no use,
but that's not guaranteed. If there is no use at this point, make
sure we don't try to use the sentinel value.

show more ...


# de787865 15-Dec-2020 Dmitry Stogov

Optimize out result value of ASSIGN, ASSIGN_OP and INC/DEC opcodes, if possible.


# fdb05b92 30-Nov-2020 Nikita Popov

Only replace IN_ARRAY result type for JMPZ/JMPNZ

Replacing the result type in the general case is dangerous,
because not all opcodes support both VAR and TMP. One common case
is the

Only replace IN_ARRAY result type for JMPZ/JMPNZ

Replacing the result type in the general case is dangerous,
because not all opcodes support both VAR and TMP. One common case
is the in_array() result being passed to SEND_VAR, which would
have to be changed to SEND_VAL.

Rather than complicating this logic, reduce the scope to only
doing the type replacement for JMPZ and JMPNZ. The only reason
we're doing this in the first place is to enable the smart branch
optimization, so we can limit it to the relevant opcodes. Replacing
the result type may be marginally useful in other cases as well
(as it may avoid reference checks), but not worth the bother.

show more ...


Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1
# 3024d9c5 07-Oct-2020 Dmitry Stogov

Optimize out MAY_BE_LONG +/- 0 and MAY_BE_DOUBLE +/- 0.0


Revision tags: php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1
# 9bf11983 24-May-2020 Ilija Tovilo

Implement nullsafe ?-> operator

RFC: https://wiki.php.net/rfc/nullsafe_operator

Closes GH-5619.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>


Revision tags: php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17
# 9fa1d133 09-Apr-2020 Ilija Tovilo

Implement match expression

RFC: https://wiki.php.net/rfc/match_expression_v2

Closes GH-5371.


# 344c0774 03-Jul-2020 Nikita Popov

Use zend_string_equals API in a couple places


Revision tags: php-7.4.5RC1, php-7.3.17RC1
# 34f1266a 23-Mar-2020 Nikita Popov

Handle NULL caller_call_opline

This can happen if there is an EXIT in the call arguments, in which
case the DO_CALL opcode may be eliminated as unreachable.


Revision tags: php-7.3.18, php-7.4.4, php-7.2.29
# 37239850 16-Mar-2020 Nikita Popov

Merge EX variants of INFO macros


Revision tags: php-7.3.16, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14
# 43443857 07-Jan-2020 Nikita Popov

Add static return type

RFC: https://wiki.php.net/rfc/static_return_type

The "static" type is represented as MAY_BE_STATIC, rather than
a class type like "self" and "parent", as

Add static return type

RFC: https://wiki.php.net/rfc/static_return_type

The "static" type is represented as MAY_BE_STATIC, rather than
a class type like "self" and "parent", as it has special
resolution semantics, and cannot be cached in the runtime cache.

Closes GH-5062.

show more ...


Revision tags: php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3
# 999e32b6 25-Sep-2019 Nikita Popov

Implement union types

According to RFC: https://wiki.php.net/rfc/union_types_v2

The type representation now makes use of both the pointer payload
and the type mask at the same t

Implement union types

According to RFC: https://wiki.php.net/rfc/union_types_v2

The type representation now makes use of both the pointer payload
and the type mask at the same time. Additionall, zend_type_list is
introduced as a new kind of pointer payload, which is used to store
multiple class types. Each of the class types is a tagged pointer,
which may be either a class name or class entry. The latter is only
used for typed properties, while arguments/returns will instead use
cache slots. A type list can contain a mix of both names and CEs at
the same time, as not all classes may be resolvable.

One thing this is missing is support for union types in arginfo
and stubs, which I want to handle separately.

I've also dropped the special object code from the JIT implementation
for now -- I plan to add this back in a different form at a later time.
For now I did not want to include non-trivial JIT changes together
with large functional changes.

Another possible piece of follow-up work is to implement "iterable"
as an internal alias for "array|Traversable". I believe this will
eliminate quite a few special-cases that had to be implemented.

Closes GH-4838.

show more ...


Revision tags: php-7.2.23, php-7.3.10
# ac4e0f08 20-Sep-2019 Nikita Popov

Make zend_type a 2-field struct

We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.

Make zend_type a 2-field struct

We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.

To avoid increasing the size of arginfo structures, the
pass_by_reference and is_variadic fields are now stored as part of
the type_mask (8-bit are reserved for custom use).

Different types of pointer payloads are distinguished based on bits
in the type_mask.

show more ...


# 6aece7be 25-Oct-2019 Nikita Popov

Optimize VERIFY_RETURN_TYPE for TMP operands as well

Only exclude CONST operands, which use a different instruction
format (they have a return operand).


# f07565b0 25-Oct-2019 Nikita Popov

Check class linking in VERIFY_RETURN_TYPE optimization

instanceof_function() requires linked classes. I'm not reusing
unlinked_instanceof() here, because it performs class loading,
w

Check class linking in VERIFY_RETURN_TYPE optimization

instanceof_function() requires linked classes. I'm not reusing
unlinked_instanceof() here, because it performs class loading,
which wouldn't be right here, I think.

show more ...


# f6f32f2c 09-Oct-2019 Dmitry Stogov

SAMRT BRANCH improvement.

Avoid need of insertion NOP opcoes between unrelated SMART BRANCH instruction and following JMPZ/JMPNZ.
Now instead of checking the opcode of following instruct

SAMRT BRANCH improvement.

Avoid need of insertion NOP opcoes between unrelated SMART BRANCH instruction and following JMPZ/JMPNZ.
Now instead of checking the opcode of following instruction, the same information is encoded into SMART BRANH result_type.

show more ...


# 39d1e50b 03-Oct-2019 Dmitry Stogov

Avoid "$a = $a + ..." to "$a += ..." conversion (compound assignments work slower).
Added DFA optimization patters (e.g. "$a = $a + 1" to "++$a"), that previously worked only for compound assignm

Avoid "$a = $a + ..." to "$a += ..." conversion (compound assignments work slower).
Added DFA optimization patters (e.g. "$a = $a + 1" to "++$a"), that previously worked only for compound assignments.

show more ...


12345