Commit 9779f343 authored by Marek Olšák's avatar Marek Olšák

radeonsi: remove si_llvm_add_attribute

parent 2c3f3651
......@@ -4463,7 +4463,8 @@ static void si_create_function(struct si_shader_context *ctx,
}
if (max_workgroup_size) {
si_llvm_add_attribute(ctx->main_fn, "amdgpu-max-work-group-size",
ac_llvm_add_target_dep_function_attr(ctx->main_fn,
"amdgpu-max-work-group-size",
max_workgroup_size);
}
LLVMAddTargetDependentFunctionAttr(ctx->main_fn,
......@@ -5006,7 +5007,7 @@ static void create_function(struct si_shader_context *ctx)
/* Reserve register locations for VGPR inputs the PS prolog may need. */
if (ctx->type == PIPE_SHADER_FRAGMENT &&
ctx->separate_prolog) {
si_llvm_add_attribute(ctx->main_fn,
ac_llvm_add_target_dep_function_attr(ctx->main_fn,
"InitialPSInputAddr",
S_0286D0_PERSP_SAMPLE_ENA(1) |
S_0286D0_PERSP_CENTER_ENA(1) |
......@@ -7791,7 +7792,7 @@ static void si_build_ps_epilog_function(struct si_shader_context *ctx,
/* Create the function. */
si_create_function(ctx, "ps_epilog", NULL, 0, &fninfo, 0);
/* Disable elimination of unused inputs. */
si_llvm_add_attribute(ctx->main_fn,
ac_llvm_add_target_dep_function_attr(ctx->main_fn,
"InitialPSInputAddr", 0xffffff);
/* Process colors. */
......
......@@ -227,8 +227,6 @@ si_shader_context_from_abi(struct ac_shader_abi *abi)
return container_of(abi, ctx, abi);
}
void si_llvm_add_attribute(LLVMValueRef F, const char *name, int value);
unsigned si_llvm_compile(LLVMModuleRef M, struct ac_shader_binary *binary,
LLVMTargetMachineRef tm,
struct pipe_debug_callback *debug);
......
......@@ -57,14 +57,6 @@ enum si_llvm_calling_convention {
RADEON_LLVM_AMDGPU_HS = 93,
};
void si_llvm_add_attribute(LLVMValueRef F, const char *name, int value)
{
char str[16];
snprintf(str, sizeof(str), "%i", value);
LLVMAddTargetDependentFunctionAttr(F, name, str);
}
struct si_llvm_diagnostics {
struct pipe_debug_callback *debug;
unsigned retval;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment