diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2019-12-16 13:30:10 +0000 |
---|---|---|
committer | Rhys Perry <pendingchaos02@gmail.com> | 2020-01-13 13:26:43 +0000 |
commit | 69bed1c9186c3e24ad54089218d58c5f7b83befe (patch) | |
tree | f7e9bab67aa372b0f94ff48807c677d852a79042 /src/amd/compiler/aco_opcodes_cpp.py | |
parent | 8f291dc14600c614788301e3265ff7f0f48b8b0d (diff) | |
download | mesa-69bed1c9186c3e24ad54089218d58c5f7b83befe.tar.gz |
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>
Diffstat (limited to 'src/amd/compiler/aco_opcodes_cpp.py')
-rw-r--r-- | src/amd/compiler/aco_opcodes_cpp.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_opcodes_cpp.py b/src/amd/compiler/aco_opcodes_cpp.py index 834da904b88..8309dee18c2 100644 --- a/src/amd/compiler/aco_opcodes_cpp.py +++ b/src/amd/compiler/aco_opcodes_cpp.py @@ -33,6 +33,7 @@ namespace aco { opcode_names = sorted(opcodes.keys()) can_use_input_modifiers = "".join([opcodes[name].input_mod for name in reversed(opcode_names)]) can_use_output_modifiers = "".join([opcodes[name].output_mod for name in reversed(opcode_names)]) +is_atomic = "".join([opcodes[name].is_atomic for name in reversed(opcode_names)]) %> extern const aco::Info instr_info = { @@ -53,6 +54,7 @@ extern const aco::Info instr_info = { }, .can_use_input_modifiers = std::bitset<${len(opcode_names)}>("${can_use_input_modifiers}"), .can_use_output_modifiers = std::bitset<${len(opcode_names)}>("${can_use_output_modifiers}"), + .is_atomic = std::bitset<${len(opcode_names)}>("${is_atomic}"), .name = { % for name in opcode_names: "${name}", |