From 28dbabec8e50f8074e8da39bb23214678ad24aee Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 4 Apr 2022 10:54:07 +0200 Subject: [PATCH] aco: do not use designated initializers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Designated initializers are a C++20 feature, but we don't use C++20. In fact, enabling C++20 for ACO triggers new compiler errors due to some equality semantics details. So let's instead stop using designated initializers here. Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_opcodes_cpp.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/amd/compiler/aco_opcodes_cpp.py b/src/amd/compiler/aco_opcodes_cpp.py index da6cb8ad3d4..8735a1345ea 100644 --- a/src/amd/compiler/aco_opcodes_cpp.py +++ b/src/amd/compiler/aco_opcodes_cpp.py @@ -37,40 +37,40 @@ is_atomic = "".join([opcodes[name].is_atomic for name in reversed(opcode_names)] %> extern const aco::Info instr_info = { - .opcode_gfx7 = { + { % for name in opcode_names: ${opcodes[name].opcode_gfx7}, % endfor }, - .opcode_gfx9 = { + { % for name in opcode_names: ${opcodes[name].opcode_gfx9}, % endfor }, - .opcode_gfx10 = { + { % for name in opcode_names: ${opcodes[name].opcode_gfx10}, % endfor }, - .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 = { + std::bitset<${len(opcode_names)}>("${can_use_input_modifiers}"), + std::bitset<${len(opcode_names)}>("${can_use_output_modifiers}"), + std::bitset<${len(opcode_names)}>("${is_atomic}"), + { % for name in opcode_names: "${name}", % endfor }, - .format = { + { % for name in opcode_names: aco::Format::${str(opcodes[name].format.name)}, % endfor }, - .operand_size = { + { % for name in opcode_names: ${opcodes[name].operand_size}, % endfor }, - .classes = { + { % for name in opcode_names: (instr_class)${opcodes[name].cls.value}, % endfor