From: Nikita Popov Date: Sat, 23 Jan 2016 16:58:36 +0000 (+0100) Subject: Remove dead code X-Git-Tag: php-7.2.0alpha1~620^2~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=319e82838aab31a0fcbd60d11d6aa3a6139e15f4;p=php Remove dead code OP_DATA isn't used in that way anymore --- diff --git a/ext/opcache/Optimizer/zend_dfg.c b/ext/opcache/Optimizer/zend_dfg.c index 8644a7c27e..fa5079b2e1 100644 --- a/ext/opcache/Optimizer/zend_dfg.c +++ b/ext/opcache/Optimizer/zend_dfg.c @@ -55,36 +55,10 @@ int zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg DFG_SET(use, set_size, j, EX_VAR_TO_NUM(next->op1.var)); } } - if (next->op2_type == IS_CV) { + if (next->op2_type & (IS_CV|IS_VAR|IS_TMP_VAR)) { if (!DFG_ISSET(def, set_size, j,EX_VAR_TO_NUM(next->op2.var))) { DFG_SET(use, set_size, j, EX_VAR_TO_NUM(next->op2.var)); } - } else if (next->op2_type == IS_VAR || - next->op2_type == IS_TMP_VAR) { - /* ZEND_ASSIGN_??? use the second operand - of the following OP_DATA instruction as - a temporary variable */ - switch (opline->opcode) { - case ZEND_ASSIGN_DIM: - case ZEND_ASSIGN_OBJ: - case ZEND_ASSIGN_ADD: - case ZEND_ASSIGN_SUB: - case ZEND_ASSIGN_MUL: - case ZEND_ASSIGN_DIV: - case ZEND_ASSIGN_MOD: - case ZEND_ASSIGN_SL: - case ZEND_ASSIGN_SR: - case ZEND_ASSIGN_CONCAT: - case ZEND_ASSIGN_BW_OR: - case ZEND_ASSIGN_BW_AND: - case ZEND_ASSIGN_BW_XOR: - case ZEND_ASSIGN_POW: - break; - default: - if (!DFG_ISSET(def, set_size, j, EX_VAR_TO_NUM(next->op2.var))) { - DFG_SET(use, set_size, j, EX_VAR_TO_NUM(next->op2.var)); - } - } } } if (opline->op1_type == IS_CV) {