From 6ab5f5703940c71a6cd7cbe57dbbcd4359033485 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 4 Dec 2022 01:37:46 -0500 Subject: [PATCH] gallivm: remove unused LP_FUNC_ATTR_LEGACY Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_intr.c | 8 +------- src/gallium/auxiliary/gallivm/lp_bld_intr.h | 6 ------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.c b/src/gallium/auxiliary/gallivm/lp_bld_intr.c index ba18627..425d545 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_intr.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.c @@ -181,7 +181,6 @@ lp_add_func_attributes(LLVMValueRef function, unsigned attrib_mask) * Set it for all intrinsics. */ attrib_mask |= LP_FUNC_ATTR_NOUNWIND; - attrib_mask &= ~LP_FUNC_ATTR_LEGACY; while (attrib_mask) { enum lp_func_attr attr = 1u << u_bit_scan(&attrib_mask); @@ -199,7 +198,6 @@ lp_build_intrinsic(LLVMBuilderRef builder, { LLVMModuleRef module = LLVMGetGlobalParent(LLVMGetBasicBlockParent(LLVMGetInsertBlock(builder))); LLVMValueRef function, call; - bool set_callsite_attrs = !(attr_mask & LP_FUNC_ATTR_LEGACY); LLVMTypeRef arg_types[LP_MAX_FUNC_ARGS]; @@ -228,17 +226,13 @@ lp_build_intrinsic(LLVMBuilderRef builder, abort(); } - if (!set_callsite_attrs) - lp_add_func_attributes(function, attr_mask); - if (gallivm_debug & GALLIVM_DEBUG_IR) { lp_debug_dump_value(function); } } call = LLVMBuildCall2(builder, function_type, function, args, num_args, ""); - if (set_callsite_attrs) - lp_add_func_attributes(call, attr_mask); + lp_add_func_attributes(call, attr_mask); return call; } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.h b/src/gallium/auxiliary/gallivm/lp_bld_intr.h index 7714f96..a3ecf0c 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_intr.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.h @@ -58,12 +58,6 @@ enum lp_func_attr { LP_FUNC_ATTR_WRITEONLY = (1 << 7), LP_FUNC_ATTR_CONVERGENT = (1 << 8), LP_FUNC_ATTR_PRESPLITCORO = (1 << 9), - - /* Legacy intrinsic that needs attributes on function declarations - * and they must match the internal LLVM definition exactly, otherwise - * intrinsic selection fails. - */ - LP_FUNC_ATTR_LEGACY = (1u << 31), }; void -- 2.7.4