Skip to content

Commit 13327a7

Browse files
committed
Simplify
1 parent b66320d commit 13327a7

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10744,30 +10744,12 @@ static int zend_jit_constructor(zend_jit_ctx *jit, const zend_op *opline, const
1074410744
}
1074510745
}
1074610746

10747-
/* Find the predecessor index of b in next_block. */
10748-
zend_basic_block *bb_next = &ssa->cfg.blocks[next_block];
10749-
int pred_i = -1;
10750-
for (pred_i = 0; pred_i < bb_next->predecessors_count; pred_i++) {
10751-
if (b == ssa->cfg.predecessors[bb_next->predecessor_offset + pred_i]) {
10752-
break;
10753-
}
10754-
}
10755-
ZEND_ASSERT(pred_i != -1);
10756-
10757-
/* override predecessors of the next block */
10758-
if (!jit->ctx.control) {
10759-
ZEND_ASSERT(jit->bb_edges[jit->bb_predecessors[next_block] + pred_i]);
10760-
ir_IF_TRUE(if_skip_constructor);
10761-
ir_MERGE_2(jit->bb_edges[jit->bb_predecessors[next_block] + pred_i], ir_END());
10762-
jit->bb_edges[jit->bb_predecessors[next_block] + pred_i] = ir_END();
10763-
} else {
10764-
ZEND_ASSERT(!jit->bb_edges[jit->bb_predecessors[next_block] + pred_i]);
10765-
/* merge current control path with the true branch of constructor skip condition */
10766-
ir_MERGE_WITH_EMPTY_TRUE(if_skip_constructor);
10767-
jit->bb_edges[jit->bb_predecessors[next_block] + pred_i] = ir_END();
10747+
/* merge current control path with the true branch of constructor skip condition */
10748+
ZEND_ASSERT(jit->ctx.control);
10749+
ir_MERGE_WITH_EMPTY_TRUE(if_skip_constructor);
10750+
_zend_jit_add_predecessor_ref(jit, next_block, b, ir_END());
1076810751

10769-
jit->b = -1;
10770-
}
10752+
jit->b = -1;
1077110753

1077210754
return 1;
1077310755
}

0 commit comments

Comments
 (0)