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.
Paths
| Differential D82078
libclc: Make all built-ins overloadable ClosedPublic Authored by daniels on Jun 18 2020, 3:12 AM.
Details Summary The SPIR spec states that all OpenCL built-in functions should be Add the overload attribute to functions which were missing them:
Diff Detail
Event TimelineComment Actions 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. Comment Actions Looks good to me. Verified that the async functions now work in SPIR-V with this patch. This revision is now accepted and ready to land.Jun 18 2020, 5:56 AM Comment Actions CI failures are due to not ignoring CL source files when running clang-tidy, per previously-submitted PR, as well as an unrelated failure in a clang-go test. Closed by commit rG3d21fa56f5f5: libclc: Make all built-ins overloadable (authored by daniels, committed by tstellar). · Explain WhyAug 17 2020, 1:56 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 286138 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
|