From e506c1367d6fee358bf6210dde33f28671ace80c Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 8 Jun 2023 00:32:36 +0300 Subject: [PATCH] Allow motion of loop invariant bound nodes Spilling of bound nodes may introduce anti-dependencies, but the previous restriction doesn't fix the possible problems --- ir_gcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ir_gcm.c b/ir_gcm.c index 796513f..24c94e4 100644 --- a/ir_gcm.c +++ b/ir_gcm.c @@ -126,8 +126,9 @@ static void ir_gcm_schedule_late(ir_ctx *ctx, uint32_t *_blocks, ir_bitset visit ir_block *bb = &ctx->cfg_blocks[b]; uint32_t loop_depth = bb->loop_depth; - if (loop_depth - && !(ctx->binding && ir_binding_find(ctx, ref))) { + if (loop_depth) { +// TODO: proper support for anti-dependencies between bound nodes ??? +// && !(ctx->binding && ir_binding_find(ctx, ref))) { uint32_t flags; use_list = &ctx->use_lists[ref];