From: Alyssa Rosenzweig Date: Fri, 4 Oct 2019 01:51:27 +0000 (-0400) Subject: pan/midgard: Calculate temp_count for liveness X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=39a4b3ebe94c5c0f642db7e347896d4a51df8f36;p=mesa.git pan/midgard: Calculate temp_count for liveness This needs to be correct or the analysis fails. Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/midgard_liveness.c b/src/panfrost/midgard/midgard_liveness.c index 4aceab7e3bc..e272931bd2f 100644 --- a/src/panfrost/midgard/midgard_liveness.c +++ b/src/panfrost/midgard/midgard_liveness.c @@ -117,6 +117,8 @@ mir_compute_liveness(compiler_context *ctx) if (ctx->metadata & MIDGARD_METADATA_LIVENESS) return; + mir_compute_temp_count(ctx); + /* List of midgard_block */ struct set *work_list = _mesa_set_create(ctx, _mesa_hash_pointer, diff --git a/src/panfrost/midgard/mir.c b/src/panfrost/midgard/mir.c index e19ed4f98a6..ff5e1d1d872 100644 --- a/src/panfrost/midgard/mir.c +++ b/src/panfrost/midgard/mir.c @@ -557,7 +557,7 @@ mir_compute_temp_count(compiler_context *ctx) mir_foreach_instr_global(ctx, ins) { if (ins->dest < SSA_FIXED_MINIMUM) - max_dest = MAX2(max_dest, ins->dest); + max_dest = MAX2(max_dest, ins->dest + 1); } ctx->temp_count = max_dest;