freedreno/ir3/sched: fixup new instr's block
authorRob Clark <robclark@freedesktop.org>
Mon, 6 Jul 2015 00:17:56 +0000 (20:17 -0400)
committerRob Clark <robclark@freedesktop.org>
Fri, 10 Jul 2015 15:57:31 +0000 (11:57 -0400)
If we split addr/pred, the original instruction could have originated
from a different block.  If we don't fixup the block ptr we hit asserts
later (in debug builds).

NOTE: perhaps we don't want to try to preserve addr/pred reg's across
block boundaries.. this at least needs some thought in case addr/pred
writes end up inside a conditional block..

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3_sched.c

index 0cb1589eb4dded4d38db1f37659a2fd4dcd9e088..2ee325518f729a3b459724a343aca7edd29e7a96 100644 (file)
@@ -477,6 +477,10 @@ sched_block(struct ir3_sched_ctx *ctx, struct ir3_block *block)
                        if (new_instr) {
                                list_del(&new_instr->node);
                                list_addtail(&new_instr->node, &unscheduled_list);
+                               /* the original instr that wrote addr/pred may have
+                                * originated from a different block:
+                                */
+                               new_instr->block = block;
                        }
 
                } else {