agx: Assert that we don't overflow registers
This will become particularly important when we bound to smaller register files. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22353>
This commit is contained in:
committed by
Marge Bot
parent
7c7b95ba2a
commit
da9c8a4627
@@ -215,6 +215,7 @@ reserve_live_in(struct ra_ctx *rctx)
|
||||
static void
|
||||
assign_regs(struct ra_ctx *rctx, agx_index v, unsigned reg)
|
||||
{
|
||||
assert(reg < rctx->bound && "must not overflow register file");
|
||||
assert(v.type == AGX_INDEX_NORMAL && "only SSA gets registers allocated");
|
||||
rctx->ssa_to_reg[v.value] = reg;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user