agx/dce: Use the helper
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Thu, 27 Jul 2023 18:05:54 +0000 (14:05 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Aug 2023 20:31:27 +0000 (20:31 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>

src/asahi/compiler/agx_dce.c

index c201495..dcabece 100644 (file)
@@ -17,9 +17,8 @@ agx_dce(agx_context *ctx, bool partial)
       BITSET_WORD *seen = calloc(BITSET_WORDS(ctx->alloc), sizeof(BITSET_WORD));
 
       agx_foreach_instr_global(ctx, I) {
-         agx_foreach_src(I, s) {
-            if (I->src[s].type == AGX_INDEX_NORMAL)
-               BITSET_SET(seen, I->src[s].value);
+         agx_foreach_ssa_src(I, s) {
+            BITSET_SET(seen, I->src[s].value);
          }
       }