LLVMSetFunctionCallConv(main_function, RADEON_LLVM_AMDGPU_CS);
for (unsigned i = 0; i < sgpr_params; ++i) {
- LLVMValueRef P = LLVMGetParam(main_function, i);
-
if (i < array_params) {
- ac_add_function_attr(P, i + 1, AC_FUNC_ATTR_BYVAL);
+ LLVMValueRef P = LLVMGetParam(main_function, i);
+ ac_add_function_attr(main_function, i + 1, AC_FUNC_ATTR_BYVAL);
ac_add_attr_dereferenceable(P, UINT64_MAX);
}
else {
- ac_add_function_attr(P, i + 1, AC_FUNC_ATTR_INREG);
+ ac_add_function_attr(main_function, i + 1, AC_FUNC_ATTR_INREG);
}
}