aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_schedule.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-03-11 08:36:31 -0400
committerMarge Bot <[email protected]>2020-03-11 20:28:20 +0000
commit5aaaf7b12c037b25f4c0a06af4744a8893c25e50 (patch)
treeb3cd38e37fb0828a23317fcf796f6acde8da57d2 /src/panfrost/midgard/midgard_schedule.c
parentc5dd1d542dea49a19ad3686d26a895395f7f7849 (diff)
pan/midgard: Subclass midgard_block from pan_block
Promote as much as we feasibly can while keeping it Midgard/Bifrost agnostic. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150>
Diffstat (limited to 'src/panfrost/midgard/midgard_schedule.c')
-rw-r--r--src/panfrost/midgard/midgard_schedule.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index 2ca0f95656c..3e9992554ed 100644
--- a/src/panfrost/midgard/midgard_schedule.c
+++ b/src/panfrost/midgard/midgard_schedule.c
@@ -245,7 +245,7 @@ bytes_for_instruction(midgard_instruction *ains)
static midgard_instruction **
flatten_mir(midgard_block *block, unsigned *len)
{
- *len = list_length(&block->instructions);
+ *len = list_length(&block->base.instructions);
if (!(*len))
return NULL;
@@ -1167,7 +1167,7 @@ schedule_block(compiler_context *ctx, midgard_block *block)
}
mir_foreach_instr_in_block_scheduled_rev(block, ins) {
- list_add(&ins->link, &block->instructions);
+ list_add(&ins->link, &block->base.instructions);
}
free(instructions); /* Allocated by flatten_mir() */
@@ -1186,7 +1186,8 @@ midgard_schedule_program(compiler_context *ctx)
/* Lowering can introduce some dead moves */
- mir_foreach_block(ctx, block) {
+ mir_foreach_block(ctx, _block) {
+ midgard_block *block = (midgard_block *) _block;
midgard_opt_dead_move_eliminate(ctx, block);
schedule_block(ctx, block);
}