]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.3' into PHP-7.4
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 10 Dec 2019 08:01:18 +0000 (09:01 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 10 Dec 2019 08:01:18 +0000 (09:01 +0100)
* PHP-7.3:
  Fix DCE with FE_FETCH

1  2 
ext/opcache/Optimizer/zend_ssa.h

index a921a5bbe0f0fb4106d6b241d4aa2cded9dcc91e,4707e3807a87ffeed71f95f88982984cd7dc6fab..cec021bd9b18b035942ade87793f63fe5ce2eae9
@@@ -217,12 -217,11 +217,15 @@@ static zend_always_inline zend_bool zen
        if (opline->opcode == ZEND_ASSIGN || opline->opcode == ZEND_UNSET_CV) {
                return ssa_op->op1_use == var && ssa_op->op2_use != var;
        }
-       if (opline->opcode == ZEND_FE_FETCH_R) {
+       // TODO: Reenable this after changing the SSA structure.
+       /*if (opline->opcode == ZEND_FE_FETCH_R) {
                return ssa_op->op2_use == var && ssa_op->op1_use != var;
-       }
+       }*/
 +      if (ssa_op->result_use == var
 +                      && opline->opcode != ZEND_ADD_ARRAY_ELEMENT
 +                      && opline->opcode != ZEND_ADD_ARRAY_UNPACK) {
++      }
+       if (ssa_op->result_use == var && opline->opcode != ZEND_ADD_ARRAY_ELEMENT) {
                return ssa_op->op1_use != var && ssa_op->op2_use != var;
        }
        return 0;