From a5dddc2d42163420fe6476c118c32deaa62fc2c5 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Mon, 22 Apr 2019 17:03:26 +0200 Subject: [PATCH] panfrost/midgard: Skip register allocation if there's no work to do Signed-off-by: Tomeu Vizoso Reviewed-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/midgard/midgard_compile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c index 348ec86..d4d26b9 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); -- 2.7.4