aco: Lower to CSSA
authorDaniel Schürmann <daniel@schuermann.dev>
Tue, 15 Oct 2019 16:23:52 +0000 (18:23 +0200)
committerDaniel Schürmann <daniel@schuermann.dev>
Wed, 30 Oct 2019 19:48:32 +0000 (19:48 +0000)
commit0b8216b2cdbcaccfd2bd1a65be6b8ac5654e3067
tree3efb44b589f7cf4131ed316cca0df23e25adb514
parent329d322a16af3139e1ed6c74ec90f6408680f051
aco: Lower to CSSA

Converting to 'Conventional SSA Form' ensures correctness w.r.t. spilling of phi nodes.
Previously, it was possible that phi operands have intersecting live-ranges, and thus,
couldn't get spilled to the same spilling slot. For this reason, ACO tried to avoid to
spill phis, even if it was beneficial.
This patch implements a conversion pass which is currently only called if spilling is necessary.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
src/amd/compiler/aco_builder_h.py
src/amd/compiler/aco_lower_to_cssa.cpp [new file with mode: 0644]
src/amd/compiler/aco_spill.cpp
src/amd/compiler/meson.build