Skip to content

aco/spill: don't re-spill loop-carried variables and other small optimizations

Daniel Schürmann requested to merge daniel-schuermann/mesa:aco_spill_misc into main

This is mostly preliminary work to mitigate regressions from a new spilling heuristic.

Besides small refactorings, this MR mainly changes the way we select which and how many variables to spill through loops. At loop headers, we take the maximum register pressure for the entire loop. Previously, we then spilled variables which were not used inside the loop in order to reduce the number of spills and reloads in the loop. While this is a great start, this MR extends this idea to also spill variables which are used inside the loop, with the reasoning that we don't have to re-spill these within the loop. This seems to be mostly beneficial and will also help a follow-up MR, which will replace the next-use distances with average-use distances, so that we won't have the knowledge whether a variable is used inside a loop or not.

based on !26875 (merged)

Merge request reports

Loading