summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_util.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-05-31 15:38:39 -0400
committerMarek Olšák <[email protected]>2019-06-03 14:32:47 -0400
commit486bc1e17ecc975f98fb495bd2f8ae580eebbf6e (patch)
treed2d58d3caf48f05aa55a82145923980c0f8e6edb /src/amd/common/ac_llvm_util.c
parent4b11ed443b85e4fcddc5d0ef60dec096ecdb951e (diff)
ac: use amdgpu-flat-work-group-size
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_util.c')
-rw-r--r--src/amd/common/ac_llvm_util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c
index 5b701603ebb..c8a8bf146fe 100644
--- a/src/amd/common/ac_llvm_util.c
+++ b/src/amd/common/ac_llvm_util.c
@@ -269,6 +269,16 @@ ac_llvm_add_target_dep_function_attr(LLVMValueRef F,
LLVMAddTargetDependentFunctionAttr(F, name, str);
}
+void ac_llvm_set_workgroup_size(LLVMValueRef F, unsigned size)
+{
+ if (!size)
+ return;
+
+ char str[32];
+ snprintf(str, sizeof(str), "%u,%u", size, size);
+ LLVMAddTargetDependentFunctionAttr(F, "amdgpu-flat-work-group-size", str);
+}
+
unsigned
ac_count_scratch_private_memory(LLVMValueRef function)
{