freedreno/ir3: propagate barrier information
authorRob Clark <robdclark@gmail.com>
Mon, 29 Jan 2018 20:38:06 +0000 (15:38 -0500)
committerRob Clark <robdclark@gmail.com>
Sat, 10 Feb 2018 19:54:58 +0000 (14:54 -0500)
When eliminating movs, the instruction that is now directly using the
src of the mov has the same scheduling order constraints as the original
mov instruction.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/ir3/ir3_cp.c

index 6a48a7dcecc788999311b5397031323ebad98379..2bf41e722b636cb346c8c69f99fd1c11658e301d 100644 (file)
@@ -348,6 +348,9 @@ reg_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr,
                        }
                        reg->flags = new_flags;
                        reg->instr = ssa(src_reg);
+
+                       instr->barrier_class |= src->barrier_class;
+                       instr->barrier_conflict |= src->barrier_conflict;
                }
 
        } else if (is_same_type_mov(src) &&
@@ -563,6 +566,8 @@ instr_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr)
                        instr->address = cond->address;
                        instr->regs[1] = cond->regs[1];
                        instr->regs[2] = cond->regs[2];
+                       instr->barrier_class |= cond->barrier_class;
+                       instr->barrier_conflict |= cond->barrier_conflict;
                        break;
                default:
                        break;