com php-src: Eliminated unreachable jumps: ext/opcache/jit/zend _jit.c ext/opcache/jit/zend_jit_x86.dasc
| From: | Dmitry Stogov | Date: | Wed, 10 Apr 2019 08:18:59 +0000 |
| Subject: | com php-src: Eliminated unreachable jumps: ext/opcache/jit/zend _jit.c ext/opcache/jit/zend_jit_x86.dasc | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-105607@lists.php.net to get a copy of this message | ||
Commit: d374920e5e020e0b3107fbcdcc3f96b00e053317
Author: Dmitry Stogov <dmitry@zend.com> Wed, 10 Apr 2019 11:18:59 +0300
Parents: ef1bc493ed9f3e1feb19d6cd93aadb4500bd33d6
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d374920e5e020e0b3107fbcdcc3f96b00e053317
Log:
Eliminated unreachable jumps
Changed paths:
M ext/opcache/jit/zend_jit.c
M ext/opcache/jit/zend_jit_x86.dasc
Diff:
diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c
index 847b613..b0940c9 100644
--- a/ext/opcache/jit/zend_jit.c
+++ b/ext/opcache/jit/zend_jit.c
@@ -2036,9 +2036,7 @@ static int zend_jit(zend_op_array *op_array, zend_ssa *ssa, const zend_op
*rt_op
#ifndef CONTEXT_THREADED_JIT
if (ssa->cfg.blocks[b].flags & ZEND_BB_ENTRY) {
if (ssa->cfg.blocks[b].flags & ZEND_BB_TARGET) {
- if (!is_terminated) {
- zend_jit_jmp(&dasm_state, b);
- }
+ /* pass */
} else if (zend_jit_level < ZEND_JIT_LEVEL_INLINE &&
ssa->cfg.blocks[b].len == 1 &&
(ssa->cfg.blocks[b].flags & ZEND_BB_EXIT) &&
@@ -2046,6 +2044,11 @@ static int zend_jit(zend_op_array *op_array, zend_ssa *ssa, const zend_op
*rt_op
/* don't generate code for BB with single opcode */
continue;
}
+ if (ssa->cfg.blocks[b].flags & ZEND_BB_FOLLOW) {
+ if (!is_terminated) {
+ zend_jit_jmp(&dasm_state, b);
+ }
+ }
zend_jit_label(&dasm_state, ssa->cfg.blocks_count + b);
zend_jit_prologue(&dasm_state);
} else
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc
index a988ea2..01f88c0 100644
--- a/ext/opcache/jit/zend_jit_x86.dasc
+++ b/ext/opcache/jit/zend_jit_x86.dasc
@@ -7788,10 +7788,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline,
zend_op_ar
return 0;
}
if (opline->opcode != ZEND_DO_ICALL) {
- uint32_t target_label = ssa->cfg.map[opline - op_array->opcodes] + 1;
-
| LOAD_IP_ADDR (opline + 1)
- | jmp =>target_label
}
}