aco/ra: Update register use bounds before recursing in get_regs_for_copies
Delaying the call to adjust_max_used_regs until after get_regs_for_copies returns puts the RA context into a state where registers past max_used_gpr may be blocked. This isn't an issue on its own, but it adds a surprising corner case to get_reg_simple that is easily avoided now. Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799>
This commit is contained in:
parent
288032a873
commit
67c1f32228
|
@ -945,12 +945,11 @@ bool get_regs_for_copies(ra_ctx& ctx,
|
|||
|
||||
/* mark the area as blocked */
|
||||
reg_file.block(PhysReg{reg_lo}, var.rc);
|
||||
adjust_max_used_regs(ctx, var.rc, reg_lo);
|
||||
|
||||
if (!get_regs_for_copies(ctx, reg_file, parallelcopies, new_vars, lb, ub, instr, def_reg_lo, def_reg_hi))
|
||||
return false;
|
||||
|
||||
adjust_max_used_regs(ctx, var.rc, reg_lo);
|
||||
|
||||
/* create parallelcopy pair (without definition id) */
|
||||
Temp tmp = Temp(id, var.rc);
|
||||
Operand pc_op = Operand(tmp);
|
||||
|
|
Loading…
Reference in New Issue