Mesa (staging/20.1): nir/opt_deref: Report progress if we remove a deref
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 22 23:13:03 UTC 2020
Module: Mesa
Branch: staging/20.1
Commit: 8a91edd2c4ff4f95591a7a09566742ecd6038f44
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a91edd2c4ff4f95591a7a09566742ecd6038f44
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Fri May 24 23:29:15 2019 -0500
nir/opt_deref: Report progress if we remove a deref
Fixes: a1c688517de "nir/opt_deref: Properly optimize ptr_as_array..."
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5170>
(cherry picked from commit db6d9cdf0661fbe25b1bc767920a5f6a0944935b)
---
.pick_status.json | 2 +-
src/compiler/nir/nir_deref.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 7cef4fe78ff..f66270c3d25 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -22,7 +22,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"
},
diff --git a/src/compiler/nir/nir_deref.c b/src/compiler/nir/nir_deref.c
index e06fd07aeb2..65757fce16f 100644
--- a/src/compiler/nir/nir_deref.c
+++ b/src/compiler/nir/nir_deref.c
@@ -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;
}
More information about the mesa-commit
mailing list