[php-src] master: Update IR

From: Date: Thu, 04 Apr 2024 07:11:55 +0000
Subject: [php-src] master: Update IR
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-127941@lists.php.net to get a copy of this message
Author: Dmitry Stogov (dstogov) Date: 2024-04-04T10:09:51+03:00 Commit: https://github.com/php/php-src/commit/0bf574afa397cc79911b029af34682e327d5839a Raw diff: https://github.com/php/php-src/commit/0bf574afa397cc79911b029af34682e327d5839a.diff Update IR IR commit: 709ccf854ec708c36c0dd2a77996554f13e722f3 Fixes failures in function JIT introduced in d2b54dc Changed paths: M ext/opcache/jit/ir/ir_cfg.c Diff: diff --git a/ext/opcache/jit/ir/ir_cfg.c b/ext/opcache/jit/ir/ir_cfg.c index 693434921fa0..a6fd641d242c 100644 --- a/ext/opcache/jit/ir/ir_cfg.c +++ b/ext/opcache/jit/ir/ir_cfg.c @@ -1545,7 +1545,6 @@ int ir_build_dominators_tree(ir_ctx *ctx) /* In rare cases, LOOP_BEGIN.op1 may be a back-edge. Skip back-edges. */ ctx->flags2 &= ~IR_NO_LOOPS; IR_ASSERT(k > 1); - IR_ASSERT(blocks[idom].successors_count == 1); ir_list_push(&worklist, idom); while (1) { k--; @@ -1555,7 +1554,6 @@ int ir_build_dominators_tree(ir_ctx *ctx) break; } IR_ASSERT(k > 0); - IR_ASSERT(blocks[idom].successors_count == 1); ir_list_push(&worklist, idom); } } @@ -1578,7 +1576,6 @@ int ir_build_dominators_tree(ir_ctx *ctx) } else { ctx->flags2 &= ~IR_NO_LOOPS; IR_ASSERT(bb->predecessors_count > 1); - IR_ASSERT(blocks[pred_b].successors_count == 1); ir_list_push(&worklist, pred_b); } } @@ -1616,8 +1613,16 @@ int ir_build_dominators_tree(ir_ctx *ctx) do { b = ir_list_pop(&worklist); bb = &blocks[b]; - IR_ASSERT(bb->successors_count == 1); succ_b = ctx->cfg_edges[bb->successors]; + if (bb->successors_count != 1) { + /* LOOP_END/END may be linked with the following ENTRY by a fake edge */ + IR_ASSERT(bb->successors_count == 2); + if (blocks[succ_b].flags & IR_BB_ENTRY) { + succ_b = ctx->cfg_edges[bb->successors + 1]; + } else { + IR_ASSERT(blocks[ctx->cfg_edges[bb->successors + 1]].flags & IR_BB_ENTRY); + } + } dom_depth = blocks[succ_b].dom_depth;; while (bb->dom_depth > dom_depth) { b = bb->dom_parent;

« previous php.cvs (#127941) next »