From e850650f92138b32a54346ae4dccd1f8b3761a53 Mon Sep 17 00:00:00 2001 From: Natalie Vock Date: Mon, 17 Feb 2025 18:42:47 +0100 Subject: [PATCH] aco: Add function call attributes ACO needs RADV to set certain attributes on NIR functions to help with compilation of function calls. Part-of: --- src/amd/compiler/aco_nir_call_attribs.h | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/amd/compiler/aco_nir_call_attribs.h diff --git a/src/amd/compiler/aco_nir_call_attribs.h b/src/amd/compiler/aco_nir_call_attribs.h new file mode 100644 index 00000000000..33dc011914c --- /dev/null +++ b/src/amd/compiler/aco_nir_call_attribs.h @@ -0,0 +1,29 @@ +/* + * Copyright © 2024 Valve Corporation + * + * SPDX-License-Identifier: MIT + */ + +#ifndef ACO_NIR_CALL_ATTRIBS_H +#define ACO_NIR_CALL_ATTRIBS_H + +enum aco_nir_call_abi { + ACO_NIR_CALL_ABI_RT_RECURSIVE, + ACO_NIR_CALL_ABI_TRAVERSAL, + ACO_NIR_CALL_ABI_AHIT_ISEC, +}; + +enum aco_nir_function_attribs { + ACO_NIR_FUNCTION_ATTRIB_ABI_MASK = 0x7F, + /* Different lanes can have different values for the function pointer to call */ + ACO_NIR_FUNCTION_ATTRIB_DIVERGENT_CALL = 0x1 << 7, + /* Function will never return */ + ACO_NIR_FUNCTION_ATTRIB_NORETURN = 0x2 << 7, +}; + +enum aco_nir_parameter_attribs { + /* Parameter value is not used by any callee and does not need to be preserved */ + ACO_NIR_PARAM_ATTRIB_DISCARDABLE = 0x1, +}; + +#endif /* ACO_NIR_CALL_ATTRIBS_H */