pan/bi: Add register allocator
We model the machine as vector (with restrictions) to natively handle
mixed types and I/O and other goodies. We use LCRA for the heavylifting.
This commit adds only the modeling to feed into LCRA and spit LCRA
solutions back; next commit will integrate it with the IR.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4158>
diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h
index 920ca7d..499fa9a 100644
--- a/src/panfrost/bifrost/compiler.h
+++ b/src/panfrost/bifrost/compiler.h
@@ -387,7 +387,7 @@
bi_max_temp(bi_context *ctx)
{
unsigned alloc = MAX2(ctx->impl->reg_alloc, ctx->impl->ssa_alloc);
- return ((alloc + 1 + ctx->temp_alloc) << 1) | BIR_IS_REG;
+ return ((alloc + 2 + ctx->temp_alloc) << 1);
}
static inline unsigned
@@ -508,6 +508,7 @@
bool bi_opt_dead_code_eliminate(bi_context *ctx, bi_block *block);
void bi_schedule(bi_context *ctx);
+void bi_register_allocate(bi_context *ctx);
/* Liveness */