com php-src: Optimize POST_INC_OBJ + FREE into PRE _INC_OBJ (in the same way as simple POST_ INC): ext/opcache/Optimizer/block_pass.c ext/opcach
e/Optimizer/pass3.c
| From: | Dmitry Stogov | Date: | Mon, 18 Sep 2017 11:56:55 +0000 |
| Subject: | com php-src: Optimize POST_INC_OBJ + FREE into PRE _INC_OBJ (in the same way as simple POST_ INC): ext/opcache/Optimizer/block_pass.c ext/opcach e/Optimizer/pass3.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99452@lists.php.net to get a copy of this message | ||
Commit: f63bfea105cd2d1285a1189c197d8371cad5f403
Author: Dmitry Stogov <dmitry@zend.com> Mon, 18 Sep 2017 14:56:55 +0300
Parents: 8109ebbd053281f4cdb13960eac9bd9595442577
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f63bfea105cd2d1285a1189c197d8371cad5f403
Log:
Optimize POST_INC_OBJ + FREE into PRE_INC_OBJ (in the same way as simple POST_INC)
Changed paths:
M ext/opcache/Optimizer/block_pass.c
M ext/opcache/Optimizer/pass3.c
Diff:
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 738e283..8d99418 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -1750,6 +1750,8 @@ static void zend_t_usage(zend_cfg *cfg, zend_op_array *op_array, zend_bitset
use
switch (opline->opcode) {
case ZEND_POST_INC:
case ZEND_POST_DEC:
+ case ZEND_POST_INC_OBJ:
+ case ZEND_POST_DEC_OBJ:
opline->opcode -= 2;
opline->result_type = IS_UNUSED;
break;
diff --git a/ext/opcache/Optimizer/pass3.c b/ext/opcache/Optimizer/pass3..c
index 975a9eb..0461ed9 100644
--- a/ext/opcache/Optimizer/pass3.c
+++ b/ext/opcache/Optimizer/pass3.c
@@ -427,6 +427,8 @@ continue_jmpznz_optimization:
}
break;
+ case ZEND_POST_INC_OBJ:
+ case ZEND_POST_DEC_OBJ:
case ZEND_POST_INC:
case ZEND_POST_DEC: {
/* POST_INC, FREE => PRE_INC */