com php-src: Remove dead code: ext/opcache/Optimizer/zend_dfg .c
| From: | Nikita Popov | Date: | Sun, 24 Jan 2016 22:04:15 +0000 |
| Subject: | com php-src: Remove dead code: ext/opcache/Optimizer/zend_dfg .c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-90741@lists.php.net to get a copy of this message | ||
Commit: 319e82838aab31a0fcbd60d11d6aa3a6139e15f4
Author: Nikita Popov <nikic@php.net> Sat, 23 Jan 2016 17:58:36 +0100
Parents: c2fea2a46d789231791e770267614fb621443359
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=319e82838aab31a0fcbd60d11d6aa3a6139e15f4
Log:
Remove dead code
OP_DATA isn't used in that way anymore
Changed paths:
M ext/opcache/Optimizer/zend_dfg.c
Diff:
diff --git a/ext/opcache/Optimizer/zend_dfg.c b/ext/opcache/Optimizer/zend_dfg.c
index 8644a7c..fa5079b 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) {