diff options
author | Iago Toral Quiroga <[email protected]> | 2015-09-04 13:23:20 +0200 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2015-09-04 15:13:49 +0200 |
commit | 96ea1663082c4a17eaf59873190f1e9677623d91 (patch) | |
tree | fc147cca6f5dd5507b84a210afbf086e4e1d4df0 /src/gallium/drivers/vc4/vc4_qir.c | |
parent | bd6e516fc24128d604f677a16f692d88d65a49f1 (diff) |
i965/vec4: Don't unspill the same register in consecutive instructions
If we have spilled/unspilled a register in the current instruction, avoid
emitting unspills for the same register in the same instruction or consecutive
instructions following the current one as long as they keep reading the spilled
register. This should allow us to avoid emitting costy unspills that come with
little benefit to register allocation.
v2:
- Apply the same logic when evaluating spilling costs (Curro).
v3:
- Abstract the logic that decides if a register can be reused in a function.
that can be used from both spill_reg and evaluate_spill_costs (Curro).
v4:
- Do not disallow reusing scratch_reg in predicated reads (Curro).
- Track if previous sources in the same instruction read scratch_reg (Curro).
- Return prev_inst_read_scratch_reg at the end (Curro).
- No need to explicitily skip scratch read/write opcodes in spill_reg (Curro).
- Fix the comments explaining what happens when we hit an instruction that
does not read or write scratch_reg (Curro)
- Return true early when the current or previous instructions read
scratch_reg with a compatible mask.
v5:
- Do not return true early, the loop should not be expensive anyway
and this adds more complexity (Curro).
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.c')
0 files changed, 0 insertions, 0 deletions