[PATCH] D82078: libclc: Make all built-ins overloadable
Daniel Stone via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 18 03:14:32 PDT 2020
daniels created this revision.
daniels added reviewers: jvesely, tstellar, jenatali.
Herald added subscribers: llvm-commits, jfb, Anastasia.
Herald added a project: LLVM.
daniels added a comment.
This fixes things for us running when emitting SPIR-V, as the LLVM -> SPIR-V translator assumes (per the SPIR spec) that all builtins are overloaded and mangled.
The unrelated formatting changes here are from `clang-format` automatically running under arc.
The SPIR spec states that all OpenCL built-in functions should be
overloadable and mangled, to ensure consistency.
Add the overload attribute to functions which were missing them:
work dimensions, memory barriers and fences, and events.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82078
Files:
libclc/amdgcn-amdhsa/lib/workitem/get_global_size.cl
libclc/amdgcn-amdhsa/lib/workitem/get_local_size.cl
libclc/amdgcn-amdhsa/lib/workitem/get_num_groups.cl
libclc/amdgcn/lib/mem_fence/fence.cl
libclc/amdgcn/lib/synchronization/barrier.cl
libclc/amdgcn/lib/workitem/get_global_offset.cl
libclc/amdgcn/lib/workitem/get_global_size.cl
libclc/amdgcn/lib/workitem/get_group_id.cl
libclc/amdgcn/lib/workitem/get_local_id.cl
libclc/amdgcn/lib/workitem/get_local_size.cl
libclc/amdgcn/lib/workitem/get_num_groups.cl
libclc/amdgcn/lib/workitem/get_work_dim.cl
libclc/generic/include/clc/async/wait_group_events.h
libclc/generic/include/clc/explicit_fence/explicit_memory_fence.h
libclc/generic/include/clc/synchronization/barrier.h
libclc/generic/include/clc/workitem/get_global_id.h
libclc/generic/include/clc/workitem/get_global_offset.h
libclc/generic/include/clc/workitem/get_global_size.h
libclc/generic/include/clc/workitem/get_group_id.h
libclc/generic/include/clc/workitem/get_local_id.h
libclc/generic/include/clc/workitem/get_local_size.h
libclc/generic/include/clc/workitem/get_num_groups.h
libclc/generic/include/clc/workitem/get_work_dim.h
libclc/generic/lib/async/wait_group_events.cl
libclc/generic/lib/workitem/get_global_id.cl
libclc/generic/lib/workitem/get_global_size.cl
libclc/ptx-nvidiacl/lib/mem_fence/fence.cl
libclc/ptx-nvidiacl/lib/synchronization/barrier.cl
libclc/ptx-nvidiacl/lib/workitem/get_global_id.cl
libclc/ptx-nvidiacl/lib/workitem/get_group_id.cl
libclc/ptx-nvidiacl/lib/workitem/get_local_id.cl
libclc/ptx-nvidiacl/lib/workitem/get_local_size.cl
libclc/ptx-nvidiacl/lib/workitem/get_num_groups.cl
libclc/r600/lib/synchronization/barrier.cl
libclc/r600/lib/workitem/get_global_offset.cl
libclc/r600/lib/workitem/get_global_size.cl
libclc/r600/lib/workitem/get_group_id.cl
libclc/r600/lib/workitem/get_local_id.cl
libclc/r600/lib/workitem/get_local_size.cl
libclc/r600/lib/workitem/get_num_groups.cl
libclc/r600/lib/workitem/get_work_dim.cl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82078.271635.patch
Type: text/x-patch
Size: 25045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200618/58be38d4/attachment.bin>
More information about the llvm-commits
mailing list