nir/builder_opcodes: Do not generate empty intrinsic indices

Gets rid of all the

struct nir_*_indices {
   int _; /* exists to avoid empty initializers */
};

declarations. 14293 loc -> 12900 loc

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23906>
This commit is contained in:
Konstantin Seurer
2023-06-27 22:17:28 +02:00
committed by Marge Bot
parent e379b9ad8c
commit 82aaf1893d

View File

@@ -62,12 +62,14 @@ nir_${name}(nir_builder *build, ${src_decl_list(opcode.num_inputs)})
% endfor
% for name, opcode in sorted(INTR_OPCODES.items()):
% if opcode.indices:
struct _nir_${name}_indices {
int _; /* exists to avoid empty initializers */
% for index in opcode.indices:
${index.c_data_type} ${index.name};
% endfor
};
% endif
% endfor
<%