com php-src: Don't create live-range across NOPs and some other instructions: Zend/zend_compile.c

From: Date: Wed, 09 Dec 2015 02:15:58 +0000
Subject: com php-src: Don't create live-range across NOPs and some other instructions: Zend/zend_compile.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-90145@lists.php.net to get a copy of this message
Commit: 5ee7b7d01ae3588e3e026592eb61159e778cdde4 Author: Dmitry Stogov <dmitry@zend.com> Wed, 9 Dec 2015 05:15:58 +0300 Parents: 2cc2396f840eadf9b9a9947ca7969b8ab0205291 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5ee7b7d01ae3588e3e026592eb61159e778cdde4 Log: Don't create live-range across NOPs and some other instructions Changed paths: M Zend/zend_compile.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index d304a6b..dd9c5a4 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1945,14 +1945,25 @@ static void zend_find_live_range(zend_op *opline, zend_uchar type, uint32_t var) static zend_always_inline int zend_is_def_range(zend_op *opline, zend_uchar type, uint32_t var) /* {{{ */ { - if (opline->result_type == type && opline->result.var == var) { - return opline->opcode != ZEND_ADD_ARRAY_ELEMENT && - opline->opcode != ZEND_ROPE_ADD; - } else if (opline->opcode == ZEND_OP_DATA) { - return (opline-1)->result_type == type && - (opline-1)->result.var == var; + while (1) { + if (opline->result_type == type && opline->result.var == var) { + return opline->opcode != ZEND_ADD_ARRAY_ELEMENT && + opline->opcode != ZEND_ROPE_ADD; + } else if (opline->opcode == ZEND_OP_DATA) { + return (opline-1)->result_type == type && + (opline-1)->result.var == var; + } else if (opline->opcode == ZEND_END_SILENCE || + opline->opcode == ZEND_NOP || + opline->opcode == ZEND_EXT_NOP || + opline->opcode == ZEND_EXT_STMT || + opline->opcode == ZEND_EXT_FCALL_BEGIN || + opline->opcode == ZEND_EXT_FCALL_END || + opline->opcode == ZEND_TICKS) { + opline--; + } else { + return 0; + } } - return 0; } /* }}} */

« previous php.cvs (#90145) next »