pan/midgard: Add make_compiler_temp_reg helper

Corrollary to make_compiler_temp (for SSA).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig
2019-07-29 16:52:36 -07:00
parent 30b15a830a
commit ae6aea0d98
+6
View File
@@ -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)
{