[PATCH] D69498: IR: Invert convergent attribute handling
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 29 09:30:17 PDT 2019
rjmccall added a comment.
In D69498#1724625 <https://reviews.llvm.org/D69498#1724625>, @kariddi wrote:
> One thing to probably note is that its not only a "target specific" issue, but a language specific issue as well (IMHO). OpenCL, CUDA, SYCL are all languages (to name a few) that have a concept of "convergence" and its not related only to the fact that they mostly run on a GPU, but to their programming model as well with respect to accessing textures and SIMD-wide communication and decision making (ballot)
>
> Considering that Clang has support for these languages it kind of makes sense to me that the frontend is taking care of implementing the supported languages correctly by applying the proper attributes.
It absolutely makes sense for Clang as a GPU-programming frontend to set attributes appropriately when targeting the GPU. I'm objecting to making "convergence" and related "code layout is semantics" properties a universal part of the IR semantics that literally every frontend has to know about in order to get reasonable behavior from LLVM. I know that doing so makes sense to GPU backend developers because you mostly work exclusively on GPU toolchains, but AFAIK there are half a dozen GPU frontends and they're all forks of Clang, whereas there are dozens of LLVM frontends out there that don't care about targeting the GPU and quite possibly never will. (And even if they do target GPUs, they often will not care about exposing thread groups; many programming environments are just interested in taking advantage of the GPU's parallel-computation power and have no interest in inter-thread interference.)
John.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69498/new/
https://reviews.llvm.org/D69498
More information about the cfe-commits
mailing list