com php-src: Allow SSA construction with source information about CV used as result (DFG fix): ext/opcache/Optimizer/zend_dfg.c

[email protected] (Dmitry Stogov)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    f07e4c033cf4edda8dcbf14c5a964e4d283fa8a8
Author:    Dmitry Stogov <[email protected]>         Thu, 30 Mar 2017 21:24:29 +0300
Parents:   6af1ffb57d097ae48ae11256c3323ecf2f042fe6
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=f07e4c033cf4edda8dcbf14c5a964e4d283fa8a8

Log:
Allow SSA construction with source information about CV used as result (DFG fix)

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 374c814..6e6997b 100644
--- a/ext/opcache/Optimizer/zend_dfg.c
+++ b/ext/opcache/Optimizer/zend_dfg.c
@@ -191,6 +191,10 @@ op2_use:
 				}
 				if (opline->result_type & (IS_CV|IS_VAR|IS_TMP_VAR)) {
 					var_num = EX_VAR_TO_NUM(opline->result.var);
+					if ((build_flags & ZEND_SSA_USE_CV_RESULTS)
+					 && opline->result_type == IS_CV) {
+						DFG_SET(use, set_size, j, var_num);
+					}
 					DFG_SET(def, set_size, j, var_num);
 				}
 			}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.