pan/midgard: Tag SSA/reg
[mesa.git] / src / panfrost / midgard / compiler.h
index 53d995a109eb401036f75bb061e1204129c5e0d4..f0cdc03038b44da6ccfe61b1dda7bf3e890f9a0d 100644 (file)
@@ -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);