gallivm: remove illegal and unused function attributes
authorMarek Olšák <marek.olsak@amd.com>
Sun, 4 Dec 2022 09:13:30 +0000 (04:13 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 6 Dec 2022 13:27:16 +0000 (13:27 +0000)
READONLY is illegal on calls. Others were unused.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20146>

src/gallium/auxiliary/gallivm/lp_bld_intr.c
src/gallium/auxiliary/gallivm/lp_bld_intr.h
src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c

index 425d545..542a4ba 100644 (file)
@@ -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:
index a3ecf0c..47a81cb 100644 (file)
@@ -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
index 4d87ad8..0136632 100644 (file)
@@ -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);