mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
jay: strengthen assert
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41064>
This commit is contained in:
parent
3388123f02
commit
f39f6ce7ba
1 changed files with 8 additions and 8 deletions
|
|
@ -337,13 +337,20 @@ typedef struct jay_ra_state {
|
|||
struct affinity *affinities;
|
||||
} jay_ra_state;
|
||||
|
||||
static bool
|
||||
reg_is_available(const jay_ra_state *ra, jay_reg reg)
|
||||
{
|
||||
assert(reg != NO_REG);
|
||||
return BITSET_TEST(ra->available_regs[r_file(reg)], r_reg(reg));
|
||||
}
|
||||
|
||||
static inline jay_reg
|
||||
current_reg(const jay_ra_state *ra, uint32_t index)
|
||||
{
|
||||
assert(index > 0 && index < ra->bld.func->ssa_alloc);
|
||||
jay_reg reg = ra->reg_for_index[index];
|
||||
|
||||
assert(reg != NO_REG);
|
||||
assert(!reg_is_available(ra, reg));
|
||||
assert(ra->index_for_reg[r_file(reg)][r_reg(reg)] == index);
|
||||
return reg;
|
||||
}
|
||||
|
|
@ -622,13 +629,6 @@ jay_emit_parallel_copies(jay_builder *b,
|
|||
free(done);
|
||||
}
|
||||
|
||||
static bool
|
||||
reg_is_available(jay_ra_state *ra, jay_reg reg)
|
||||
{
|
||||
assert(reg != NO_REG);
|
||||
return BITSET_TEST(ra->available_regs[r_file(reg)], r_reg(reg));
|
||||
}
|
||||
|
||||
static void
|
||||
assign_reg_for_index(jay_ra_state *ra, uint32_t index, jay_reg reg)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue