diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-29 16:52:36 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-30 10:01:19 -0700 |
commit | ae6aea0d987f288dcfe0e8d5858aeacb3cef5e39 (patch) | |
tree | 8178b3c1c03caaba8ad0cb9ce4d85a2fdaa4ccc9 /src/panfrost | |
parent | 30b15a830a9456492d9be8f4dfe37770e821e528 (diff) |
pan/midgard: Add make_compiler_temp_reg helper
Corrollary to make_compiler_temp (for SSA).
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/midgard/compiler.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ -388,6 +388,12 @@ make_compiler_temp(compiler_context *ctx) } 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) { if (src->is_ssa) |