mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
pan/bi: Account for MEMMOV in bi_record_sizes
Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39305>
This commit is contained in:
parent
0654c98b5e
commit
2fd5b8a391
1 changed files with 23 additions and 0 deletions
|
|
@ -1391,6 +1391,7 @@ bi_record_sizes(bi_context *ctx, uint32_t *sizes)
|
||||||
assert(sizes[idx] == 0 && "SSA broken");
|
assert(sizes[idx] == 0 && "SSA broken");
|
||||||
switch (I->op) {
|
switch (I->op) {
|
||||||
case BI_OPCODE_PHI:
|
case BI_OPCODE_PHI:
|
||||||
|
case BI_OPCODE_MEMMOV:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sizes[idx] = bi_count_write_registers(I, d);
|
sizes[idx] = bi_count_write_registers(I, d);
|
||||||
|
|
@ -1411,6 +1412,28 @@ bi_record_sizes(bi_context *ctx, uint32_t *sizes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* After we know PHI sizes, determine MEMMOV sizes. */
|
||||||
|
|
||||||
|
bi_foreach_instr_global(ctx, I) {
|
||||||
|
if (I->op != BI_OPCODE_MEMMOV || I->dest[0].type != BI_INDEX_NORMAL)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (I->dest[0].memory) {
|
||||||
|
assert(!I->src[0].memory);
|
||||||
|
sizes[I->dest[0].value] = sizes[I->src[0].value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bi_foreach_instr_global(ctx, I) {
|
||||||
|
if (I->op != BI_OPCODE_MEMMOV || I->dest[0].type != BI_INDEX_NORMAL)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!I->dest[0].memory) {
|
||||||
|
assert(I->src[0].memory);
|
||||||
|
sizes[I->dest[0].value] = sizes[I->src[0].value];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue