mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-06 10:00:30 +01:00
ac/llvm: inline ac_get_load_intr_attribs
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:
parent
ce860953a6
commit
de3fcc77c7
2 changed files with 4 additions and 7 deletions
|
|
@ -1322,7 +1322,8 @@ static LLVMValueRef ac_build_buffer_load_common(struct ac_llvm_context *ctx, LLV
|
|||
snprintf(name, sizeof(name), "llvm.amdgcn.%s.buffer.load.%s", indexing_kind, type_name);
|
||||
}
|
||||
|
||||
return ac_build_intrinsic(ctx, name, type, args, idx, ac_get_load_intr_attribs(can_speculate));
|
||||
return ac_build_intrinsic(ctx, name, type, args, idx,
|
||||
can_speculate ? AC_ATTR_INVARIANT_LOAD : 0);
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_buffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc, int num_channels,
|
||||
|
|
@ -1435,7 +1436,8 @@ static LLVMValueRef ac_build_tbuffer_load(struct ac_llvm_context *ctx, LLVMValue
|
|||
|
||||
snprintf(name, sizeof(name), "llvm.amdgcn.%s.tbuffer.load.%s", indexing_kind, type_name);
|
||||
|
||||
return ac_build_intrinsic(ctx, name, type, args, idx, ac_get_load_intr_attribs(can_speculate));
|
||||
return ac_build_intrinsic(ctx, name, type, args, idx,
|
||||
can_speculate ? AC_ATTR_INVARIANT_LOAD : 0);
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_struct_tbuffer_load(struct ac_llvm_context *ctx, LLVMValueRef rsrc,
|
||||
|
|
|
|||
|
|
@ -96,11 +96,6 @@ void ac_llvm_add_target_dep_function_attr(LLVMValueRef F, const char *name, unsi
|
|||
void ac_llvm_set_workgroup_size(LLVMValueRef F, unsigned size);
|
||||
void ac_llvm_set_target_features(LLVMValueRef F, struct ac_llvm_context *ctx);
|
||||
|
||||
static inline unsigned ac_get_load_intr_attribs(bool can_speculate)
|
||||
{
|
||||
return can_speculate ? AC_ATTR_INVARIANT_LOAD : 0;
|
||||
}
|
||||
|
||||
LLVMTargetLibraryInfoRef ac_create_target_library_info(const char *triple);
|
||||
void ac_dispose_target_library_info(LLVMTargetLibraryInfoRef library_info);
|
||||
PUBLIC void ac_init_shared_llvm_once(void); /* Do not use directly, use ac_init_llvm_once */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue