llvm
llvm copied to clipboard
Implement work_group_static
The patch partially implements work_group_static and update proposal.
Implemented:
-
work_group_staticto handle static allocation in kernel. -
get_dynamic_work_group_memoryto handle runtime allocation, but only on CUDA
work_group_static is implemented by exposing SYCLScope(WorkGroup), allowing the class to be decorated by the attribute and uses the same mechanism during lowering to place the variable in local memory.
get_dynamic_work_group_memory uses a new builtin function, __sycl_dynamicLocalMemoryPlaceholder , which is lowered into referencing a 0 sized array GV when targeting NVPTX. The approach for SPIR will need to differ from this lowering.