nir/opt_deref: Report progress if we remove a deref

Fixes: a1c688517d "nir/opt_deref: Properly optimize ptr_as_array..."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5170>
(cherry picked from commit db6d9cdf06)
This commit is contained in:
Jason Ekstrand 2019-05-24 23:29:15 -05:00 committed by Dylan Baker
parent 1b95522f3d
commit 4efaa80139
2 changed files with 4 additions and 2 deletions

View file

@ -1696,7 +1696,7 @@
"description": "nir/opt_deref: Report progress if we remove a deref",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "a1c688517dee32c57af17d8e11029eb7470f52d4"
},

View file

@ -940,7 +940,9 @@ opt_deref_cast(nir_builder *b, nir_deref_instr *cast)
/* If uses would be a bit crazy */
assert(list_is_empty(&cast->dest.ssa.if_uses));
nir_deref_instr_remove_if_unused(cast);
if (nir_deref_instr_remove_if_unused(cast))
progress = true;
return progress;
}