ac/llvm: inline ac_array_in_const*_addr_space

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36696>
This commit is contained in:
Marek Olšák
2025-08-08 15:52:32 -04:00
parent a1278095d3
commit 4edcd8a87f
3 changed files with 4 additions and 17 deletions
+3 -13
View File
@@ -2313,7 +2313,7 @@ LLVMTypeRef ac_arg_type_to_pointee_type(struct ac_llvm_context *ctx, enum ac_arg
return ctx->f32;
break;
case AC_ARG_CONST_PTR_PTR:
return ac_array_in_const32_addr_space(ctx);
return LLVMPointerTypeInContext(ctx->context, AC_ADDR_SPACE_CONST_32BIT);
break;
case AC_ARG_CONST_DESC_PTR:
return ctx->v4i32;
@@ -2327,16 +2327,6 @@ LLVMTypeRef ac_arg_type_to_pointee_type(struct ac_llvm_context *ctx, enum ac_arg
}
}
LLVMTypeRef ac_array_in_const_addr_space(struct ac_llvm_context *ctx)
{
return LLVMPointerTypeInContext(ctx->context, AC_ADDR_SPACE_CONST);
}
LLVMTypeRef ac_array_in_const32_addr_space(struct ac_llvm_context *ctx)
{
return LLVMPointerTypeInContext(ctx->context, AC_ADDR_SPACE_CONST_32BIT);
}
static struct ac_llvm_flow *get_current_flow(struct ac_llvm_context *ctx)
{
if (ctx->flow->depth > 0)
@@ -3617,10 +3607,10 @@ static LLVMTypeRef arg_llvm_type(enum ac_arg_type type, unsigned size, struct ac
}
if (size == 1) {
return ac_array_in_const32_addr_space(ctx);
return LLVMPointerTypeInContext(ctx->context, AC_ADDR_SPACE_CONST_32BIT);
} else {
assert(size == 2);
return ac_array_in_const_addr_space(ctx);
return LLVMPointerTypeInContext(ctx->context, AC_ADDR_SPACE_CONST);
}
}
-3
View File
@@ -408,9 +408,6 @@ void ac_init_exec_full_mask(struct ac_llvm_context *ctx);
LLVMValueRef ac_find_lsb(struct ac_llvm_context *ctx, LLVMTypeRef dst_type, LLVMValueRef src0);
LLVMTypeRef ac_array_in_const_addr_space(struct ac_llvm_context *ctx);
LLVMTypeRef ac_array_in_const32_addr_space(struct ac_llvm_context *ctx);
void ac_build_bgnloop(struct ac_llvm_context *ctx, int lable_id);
void ac_build_break(struct ac_llvm_context *ctx);
void ac_build_continue(struct ac_llvm_context *ctx);
@@ -261,7 +261,7 @@ LLVMValueRef si_prolog_get_internal_binding_slot(struct si_shader_context *ctx,
{
LLVMValueRef list = LLVMBuildIntToPtr(
ctx->ac.builder, ac_get_arg(&ctx->ac, ctx->args->internal_bindings),
ac_array_in_const32_addr_space(&ctx->ac), "");
LLVMPointerTypeInContext(ctx->ac.context, AC_ADDR_SPACE_CONST_32BIT), "");
LLVMValueRef index = LLVMConstInt(ctx->ac.i32, slot, 0);
return ac_build_load_to_sgpr(&ctx->ac,