From cf74048fd14eb594dbb23e07d37cf8df44564263 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 4 Apr 2020 09:53:32 -0700 Subject: freedreno/ir3: better cleanup when removing unused instructions Do a better job of pruning when removing unused instructions, including cleaning up dangling false-deps. This introduces a new ssa src pointer iterator, which makes it easy to clear links without having to think about whether it is a normal ssa src or a false-dep. Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3_postsched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/freedreno/ir3/ir3_postsched.c') diff --git a/src/freedreno/ir3/ir3_postsched.c b/src/freedreno/ir3/ir3_postsched.c index 09e58750c04..521078a04c9 100644 --- a/src/freedreno/ir3/ir3_postsched.c +++ b/src/freedreno/ir3/ir3_postsched.c @@ -685,7 +685,7 @@ cleanup_self_movs(struct ir3 *ir) } for (unsigned i = 0; i < instr->deps_count; i++) { - if (is_self_mov(instr->deps[i])) { + if (instr->deps[i] && is_self_mov(instr->deps[i])) { list_delinit(&instr->deps[i]->node); instr->deps[i] = instr->deps[i]->regs[1]->instr; } -- cgit v1.2.3