aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/panfrost/midgard/compiler.h')
-rw-r--r--src/panfrost/midgard/compiler.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index 53d995a109e..f0cdc03038b 100644
--- a/src/panfrost/midgard/compiler.h
+++ b/src/panfrost/midgard/compiler.h
@@ -370,6 +370,16 @@ mir_is_alu_bundle(midgard_bundle *bundle)
return IS_ALU(bundle->tag);
}
+/* Registers/SSA are distinguish in the backend by the bottom-most bit */
+
+#define IS_REG (1)
+
+static inline unsigned
+make_compiler_temp(compiler_context *ctx)
+{
+ return (ctx->func->impl->ssa_alloc + ctx->temp_alloc++) << 1;
+}
+
/* MIR manipulation */
void mir_rewrite_index(compiler_context *ctx, unsigned old, unsigned new);