Skip to content

aco: rework lowering to CSSA

Daniel Schürmann requested to merge daniel-schuermann/mesa:aco_cssa into master

The lowering to CSSA has not been exhaustive and could miss out on some interferences between phi-operands. For example, this case was not considered:

a = ...
if () {
  b = ..
} else {
  c = ..
}
x = phi(a, c)
y = phi(b, a)

Some of these cases would need a full live variable analysis to find interfering operands, like

a = ...
if () {
} else {
  b = ...
  use a
}
phi = (a,b)

For this reason, the new approach emits parallelcopies for all operands which might interfere, i.e. if any operand's definition point dominates the definition point of a different operand. To reduce the negative impact of the additional parallelcopies, we try to coalesce them during register allocation.

Merge request reports