From 89cd402c9b77231596b79030dd671f880735908b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 4 Dec 2022 04:13:30 -0500 Subject: [PATCH] gallivm: remove illegal and unused function attributes READONLY is illegal on calls. Others were unused. Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_intr.c | 3 --- src/gallium/auxiliary/gallivm/lp_bld_intr.h | 7 ++----- src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c | 4 ---- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.c b/src/gallium/auxiliary/gallivm/lp_bld_intr.c index 425d545..542a4ba 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_intr.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.c @@ -138,9 +138,6 @@ static const char *attr_to_str(enum lp_func_attr attr) case LP_FUNC_ATTR_INREG: return "inreg"; case LP_FUNC_ATTR_NOALIAS: return "noalias"; case LP_FUNC_ATTR_NOUNWIND: return "nounwind"; - case LP_FUNC_ATTR_READNONE: return "readnone"; - case LP_FUNC_ATTR_READONLY: return "readonly"; - case LP_FUNC_ATTR_WRITEONLY: return "writeonly"; case LP_FUNC_ATTR_CONVERGENT: return "convergent"; case LP_FUNC_ATTR_PRESPLITCORO: return "presplitcoroutine"; default: diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.h b/src/gallium/auxiliary/gallivm/lp_bld_intr.h index a3ecf0c..47a81cb 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_intr.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.h @@ -53,11 +53,8 @@ enum lp_func_attr { LP_FUNC_ATTR_INREG = (1 << 2), LP_FUNC_ATTR_NOALIAS = (1 << 3), LP_FUNC_ATTR_NOUNWIND = (1 << 4), - LP_FUNC_ATTR_READNONE = (1 << 5), - LP_FUNC_ATTR_READONLY = (1 << 6), - LP_FUNC_ATTR_WRITEONLY = (1 << 7), - LP_FUNC_ATTR_CONVERGENT = (1 << 8), - LP_FUNC_ATTR_PRESPLITCORO = (1 << 9), + LP_FUNC_ATTR_CONVERGENT = (1 << 5), + LP_FUNC_ATTR_PRESPLITCORO = (1 << 6), }; void diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c b/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c index 4d87ad8..0136632 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c @@ -405,8 +405,6 @@ llvmpipe_fs_variant_linear_llvm(struct llvmpipe_context *lp, LLVMValueRef inputs_ptr = LLVMBuildCall2(builder, call_type, fetch_ptr, &elem, 1, ""); assert(LLVMGetTypeKind(LLVMTypeOf(inputs_ptr)) == LLVMPointerTypeKind); - /* Mark the function read-only so that LLVM can optimize it away */ - lp_add_function_attr(inputs_ptr, -1, LP_FUNC_ATTR_READONLY); lp_add_function_attr(inputs_ptr, -1, LP_FUNC_ATTR_NOUNWIND); lp_build_name(inputs_ptr, "input%u_ptr", attrib); @@ -445,8 +443,6 @@ llvmpipe_fs_variant_linear_llvm(struct llvmpipe_context *lp, LLVMValueRef texels_ptr = LLVMBuildCall2(builder, call_type, fetch_ptr, &elem, 1, ""); assert(LLVMGetTypeKind(LLVMTypeOf(texels_ptr)) == LLVMPointerTypeKind); - /* Mark the function read-only so that LLVM can optimize it away */ - lp_add_function_attr(texels_ptr, -1, LP_FUNC_ATTR_READONLY); lp_add_function_attr(texels_ptr, -1, LP_FUNC_ATTR_NOUNWIND); lp_build_name(texels_ptr, "tex%u_ptr", attrib); -- 2.7.4