From: Tomeu Vizoso Date: Mon, 22 Apr 2019 15:03:26 +0000 (+0200) Subject: panfrost/midgard: Skip register allocation if there's no work to do X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a5dddc2d42163420fe6476c118c32deaa62fc2c5;p=mesa.git panfrost/midgard: Skip register allocation if there's no work to do Signed-off-by: Tomeu Vizoso Reviewed-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c index 348ec861404..d4d26b9a25e 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c @@ -2058,6 +2058,9 @@ allocate_registers(compiler_context *ctx) print_mir_block(block); } + if (!ctx->temp_count) + return; + /* Let's actually do register allocation */ int nodes = ctx->temp_count; struct ra_graph *g = ra_alloc_interference_graph(regs, nodes);