mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
jay/ra: don't reserve registers when not spilling
No changes at SIMD16. At SIMD32: Totals: Instrs: 4691895 -> 4691989 (+0.00%); split: -0.03%, +0.03% CodeSize: 76010880 -> 76011248 (+0.00%); split: -0.03%, +0.03% Number of spill instructions: 54369 -> 54223 (-0.27%) Number of fill instructions: 56668 -> 56519 (-0.26%) Totals from 71 (2.68% of 2647) affected shaders: Instrs: 75963 -> 76057 (+0.12%); split: -1.67%, +1.79% CodeSize: 1229792 -> 1230160 (+0.03%); split: -1.71%, +1.74% Number of spill instructions: 146 -> 0 (-inf%) Number of fill instructions: 149 -> 0 (-inf%) 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
e5bf153d4f
commit
7d2a88a9e5
1 changed files with 3 additions and 7 deletions
|
|
@ -1548,15 +1548,11 @@ spill_file(jay_function *f, enum jay_file file, bool *spilled)
|
|||
limit = 13;
|
||||
}
|
||||
|
||||
/* Ensures we don't XOR swap, XXX: TODO: FIXME */
|
||||
limit--;
|
||||
|
||||
if (f->demand[file] > limit) {
|
||||
/* In the worst case, we
|
||||
* require 2 temporary registers to lower a memory-memory swap produced by
|
||||
* parallel copy lowering, so adjust the limit to be num_regs - 2.
|
||||
/* In the worst case when spilling, we require 2 temporary registers to
|
||||
* lower a memory-memory swap produced by parallel copy lowering.
|
||||
*/
|
||||
limit--;
|
||||
limit -= 2;
|
||||
|
||||
/* If we spill, we need to reserve UGPRs for spilling */
|
||||
if (!(*spilled)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue