diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2019-04-10 11:18:59 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2019-04-10 11:18:59 +0300 |
| commit | d374920e5e020e0b3107fbcdcc3f96b00e053317 (patch) | |
| tree | cec628d6633cbd9754fa00c753111097834e5a9f | |
| parent | ef1bc493ed9f3e1feb19d6cd93aadb4500bd33d6 (diff) | |
| download | php-git-d374920e5e020e0b3107fbcdcc3f96b00e053317.tar.gz | |
Eliminated unreachable jumps
| -rw-r--r-- | ext/opcache/jit/zend_jit.c | 9 | ||||
| -rw-r--r-- | ext/opcache/jit/zend_jit_x86.dasc | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 847b6130e9..b0940c9ca9 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 a988ea2ca2..01f88c031c 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 } } |
