diff options
author | Rob Clark <[email protected]> | 2020-04-04 09:53:32 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-13 20:47:28 +0000 |
commit | cf74048fd14eb594dbb23e07d37cf8df44564263 (patch) | |
tree | 03032680f2694593acd4bfb202aa5cdf60bb8031 /src/freedreno/ir3/ir3_postsched.c | |
parent | 96ff2a4099d0eb5c29255429a0e5284e461ec8d5 (diff) |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4440>
Diffstat (limited to 'src/freedreno/ir3/ir3_postsched.c')
-rw-r--r-- | src/freedreno/ir3/ir3_postsched.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |