mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 16:30:29 +01:00
ir3/spill: Mark reload destination as early-clobber
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14107>
This commit is contained in:
parent
2ff5826f09
commit
72b32d83fb
1 changed files with 8 additions and 0 deletions
|
|
@ -905,6 +905,14 @@ reload(struct ra_spill_ctx *ctx, struct ir3_register *reg,
|
|||
ir3_instr_create(block, OPC_RELOAD_MACRO, 1, 3);
|
||||
struct ir3_register *dst = __ssa_dst(reload);
|
||||
dst->flags |= reg->flags & (IR3_REG_HALF | IR3_REG_ARRAY);
|
||||
/* The reload may be split into multiple pieces, and if the destination
|
||||
* overlaps with the base register then it could get clobbered before the
|
||||
* last ldp in the sequence. Note that we always reserve space for the base
|
||||
* register throughout the whole program, so effectively extending its live
|
||||
* range past the end of the instruction isn't a problem for our pressure
|
||||
* accounting.
|
||||
*/
|
||||
dst->flags |= IR3_REG_EARLY_CLOBBER;
|
||||
ir3_src_create(reload, INVALID_REG, ctx->base_reg->flags)->def = ctx->base_reg;
|
||||
struct ir3_register *offset_reg =
|
||||
ir3_src_create(reload, INVALID_REG, IR3_REG_IMMED);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue