ac/llvm: remove illegal function attributes READONLY and WRITEONLY

They are only legal on parameters.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20146>
This commit is contained in:
Marek Olšák 2022-12-04 04:30:16 -05:00 committed by Marge Bot
parent 89cd402c9b
commit e94b040add
4 changed files with 3 additions and 12 deletions

View file

@ -4343,8 +4343,7 @@ LLVMValueRef ac_build_load_helper_invocation(struct ac_llvm_context *ctx)
LLVMValueRef result;
if (LLVM_VERSION_MAJOR >= 13) {
result = ac_build_intrinsic(ctx, "llvm.amdgcn.live.mask", ctx->i1, NULL, 0,
AC_FUNC_ATTR_READONLY);
result = ac_build_intrinsic(ctx, "llvm.amdgcn.live.mask", ctx->i1, NULL, 0, 0);
} else {
result = ac_build_intrinsic(ctx, "llvm.amdgcn.ps.live", ctx->i1, NULL, 0,
AC_FUNC_ATTR_READNONE);

View file

@ -261,10 +261,6 @@ static const char *attr_to_str(enum ac_func_attr attr)
return "nounwind";
case AC_FUNC_ATTR_READNONE:
return "readnone";
case AC_FUNC_ATTR_READONLY:
return "readonly";
case AC_FUNC_ATTR_WRITEONLY:
return "writeonly";
case AC_FUNC_ATTR_CONVERGENT:
return "convergent";
default:

View file

@ -47,8 +47,6 @@ enum ac_func_attr
AC_FUNC_ATTR_NOALIAS = (1 << 3),
AC_FUNC_ATTR_NOUNWIND = (1 << 4),
AC_FUNC_ATTR_READNONE = (1 << 5),
AC_FUNC_ATTR_READONLY = (1 << 6),
AC_FUNC_ATTR_WRITEONLY = (1 << 7),
AC_FUNC_ATTR_CONVERGENT = (1 << 8),
};
@ -104,9 +102,7 @@ void ac_llvm_set_target_features(LLVMValueRef F, struct ac_llvm_context *ctx);
static inline unsigned ac_get_load_intr_attribs(bool can_speculate)
{
/* READNONE means writes can't affect it, while READONLY means that
* writes can affect it. */
return can_speculate ? AC_FUNC_ATTR_READNONE : AC_FUNC_ATTR_READONLY;
return can_speculate ? AC_FUNC_ATTR_READNONE : 0;
}
LLVMTargetLibraryInfoRef ac_create_target_library_info(const char *triple);

View file

@ -2667,7 +2667,7 @@ static LLVMValueRef visit_image_load(struct ac_nir_context *ctx, const nir_intri
if (!level_zero)
args.lod = get_src(ctx, instr->src[3]);
args.dmask = 15;
args.attributes = AC_FUNC_ATTR_READONLY;
args.attributes = 0;
assert(instr->dest.is_ssa);
args.d16 = instr->dest.ssa.bit_size == 16;