ac/llvm: make ac_get_arg non-inline

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 23:01:35 -04:00
parent 54fe9aa664
commit 324a7f7e24
2 changed files with 10 additions and 8 deletions
+9
View File
@@ -3665,3 +3665,12 @@ LLVMValueRef ac_build_is_inf_or_nan(struct ac_llvm_context *ctx, LLVMValueRef a)
};
return ac_build_intrinsic(ctx, "llvm.amdgcn.class.f32", ctx->i1, args, 2, 0);
}
LLVMValueRef ac_get_arg(struct ac_llvm_context *ctx, struct ac_arg arg)
{
assert(arg.used);
if (arg.arg_index == ctx->ring_offsets_index)
return ctx->ring_offsets;
int offset = arg.arg_index > ctx->ring_offsets_index ? -1 : 0;
return LLVMGetParam(ctx->main_function.value, arg.arg_index + offset);
}
+1 -8
View File
@@ -481,14 +481,7 @@ struct ac_ngg_prim {
LLVMValueRef passthrough;
};
static inline LLVMValueRef ac_get_arg(struct ac_llvm_context *ctx, struct ac_arg arg)
{
assert(arg.used);
if (arg.arg_index == ctx->ring_offsets_index)
return ctx->ring_offsets;
int offset = arg.arg_index > ctx->ring_offsets_index ? -1 : 0;
return LLVMGetParam(ctx->main_function.value, arg.arg_index + offset);
}
LLVMValueRef ac_get_arg(struct ac_llvm_context *ctx, struct ac_arg arg);
enum ac_llvm_calling_convention
{