From ae6aea0d987f288dcfe0e8d5858aeacb3cef5e39 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 29 Jul 2019 16:52:36 -0700 Subject: [PATCH] pan/midgard: Add make_compiler_temp_reg helper Corrollary to make_compiler_temp (for SSA). Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 7f5714d013c..93c39686f13 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -387,6 +387,12 @@ make_compiler_temp(compiler_context *ctx) return (ctx->func->impl->ssa_alloc + ctx->temp_alloc++) << 1; } +static inline unsigned +make_compiler_temp_reg(compiler_context *ctx) +{ + return ((ctx->func->impl->reg_alloc + ctx->temp_alloc++) << 1) | IS_REG; +} + static inline unsigned nir_src_index(compiler_context *ctx, nir_src *src) { -- 2.30.2