aco: don't DCE atomics with return values
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 16 Dec 2019 13:30:10 +0000 (13:30 +0000)
committerRhys Perry <pendingchaos02@gmail.com>
Mon, 13 Jan 2020 13:26:43 +0000 (13:26 +0000)
commit69bed1c9186c3e24ad54089218d58c5f7b83befe
treef7e9bab67aa372b0f94ff48807c677d852a79042
parent8f291dc14600c614788301e3265ff7f0f48b8b0d
aco: don't DCE atomics with return values

We don't create atomics with definitions if they are not used in NIR, but
our own DCE can remove the uses if an export turns out to be null.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>
src/amd/compiler/aco_dead_code_analysis.cpp
src/amd/compiler/aco_ir.h
src/amd/compiler/aco_opcodes.py
src/amd/compiler/aco_opcodes_cpp.py
src/amd/compiler/aco_optimizer.cpp