diff options
author | Connor Abbott <[email protected]> | 2019-09-18 12:29:45 +0700 |
---|---|---|
committer | Connor Abbott <[email protected]> | 2019-09-24 08:43:06 +0200 |
commit | 96c31d9a555c46b380ea861c08b620eb556954bf (patch) | |
tree | 2f843520edcd7616abea0093d9c5447aca82e318 /src/gallium/drivers/lima/ir | |
parent | 1cd1cce03523dcf1ca680b753ea0e32b0f8bc549 (diff) |
lima/gpir: Fix postlog2 fixup handling
We guarantee that a complex1 op is always used by postlog2 directly by
rewriting the postlog2 op to be a move when there would be a move
inserted between them. But we weren't doing this in all circumstances
where there might be a move. Move the logic to place_move() so that it
always happens. Fixes a few log tests that happened to start failing due
to changes in the register allocator leading to a different scheduling
order.
Reviewed-by: Vasily Khoruzhick <[email protected]>
Diffstat (limited to 'src/gallium/drivers/lima/ir')
-rw-r--r-- | src/gallium/drivers/lima/ir/gp/scheduler.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gallium/drivers/lima/ir/gp/scheduler.c b/src/gallium/drivers/lima/ir/gp/scheduler.c index ac132776d43..e069079591c 100644 --- a/src/gallium/drivers/lima/ir/gp/scheduler.c +++ b/src/gallium/drivers/lima/ir/gp/scheduler.c @@ -1342,6 +1342,17 @@ static bool try_node(sched_ctx *ctx) static void place_move(sched_ctx *ctx, gpir_node *node) { + /* For complex1 that is consumed by a postlog2, we cannot allow any moves + * in between. Convert the postlog2 to a move and insert a new postlog2, + * and try to schedule it again in try_node(). + */ + gpir_node *postlog2 = consuming_postlog2(node); + if (postlog2) { + postlog2->op = gpir_op_mov; + create_postlog2(ctx, node); + return; + } + gpir_node *move = create_move(ctx, node); gpir_node_foreach_succ_safe(move, dep) { gpir_node *succ = dep->succ; @@ -1380,17 +1391,7 @@ static bool sched_move(sched_ctx *ctx) { list_for_each_entry(gpir_node, node, &ctx->ready_list, list) { if (node->sched.max_node) { - /* For complex1 that is consumed by a postlog2, we cannot allow any - * moves in between. Convert the postlog2 to a move and insert a new - * postlog2, and try to schedule it again in try_node(). - */ - gpir_node *postlog2 = consuming_postlog2(node); - if (postlog2) { - postlog2->op = gpir_op_mov; - create_postlog2(ctx, node); - } else { - place_move(ctx, node); - } + place_move(ctx, node); return true; } } |