summaryrefslogtreecommitdiff
path: root/ext/opcache/Optimizer/zend_inference.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2020-10-13 00:19:02 +0300
committerDmitry Stogov <dmitry@zend.com>2020-10-13 00:19:02 +0300
commit9c3c67b1bf4e1d2cdd8626064b1979b4173f9734 (patch)
tree70aa683a34a9dbbc13bc3562b5565f175db0790b /ext/opcache/Optimizer/zend_inference.c
parent51cb9b837300d31080a8b2763a6b8687551454b1 (diff)
parent87beb22ff80a1d994cda6a551e626ddcbb063abb (diff)
downloadphp-git-9c3c67b1bf4e1d2cdd8626064b1979b4173f9734.tar.gz
Merge branch 'PHP-8.0'
* PHP-8.0: Perform trace range propagation
Diffstat (limited to 'ext/opcache/Optimizer/zend_inference.c')
-rw-r--r--ext/opcache/Optimizer/zend_inference.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index c306da2726..1dbbeb97f0 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -843,7 +843,6 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
uint32_t line;
zend_op *opline;
zend_ssa_op *ssa_op;
- zend_long op1_min, op2_min, op1_max, op2_max;
if (ssa->vars[var].definition_phi) {
zend_ssa_phi *p = ssa->vars[var].definition_phi;
@@ -984,6 +983,13 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
opline = op_array->opcodes + line;
ssa_op = &ssa->ops[line];
+ return zend_inference_propagate_range(op_array, ssa, opline, ssa_op, var, tmp);
+}
+
+int zend_inference_propagate_range(const zend_op_array *op_array, zend_ssa *ssa, zend_op *opline, zend_ssa_op* ssa_op, int var, zend_ssa_range *tmp)
+{
+ zend_long op1_min, op2_min, op1_max, op2_max;
+
tmp->underflow = 0;
tmp->overflow = 0;
switch (opline->opcode) {