saiislam added a comment. In D83492#2142086 <https://reviews.llvm.org/D83492#2142086>, @JonChesterfield wrote:
> Changing to getGridValue would be useful for sharing parts of this with > amdgcn. > > The aomp toolchain handles codegen for amdgcn by adding if (isAMDGCN) to this > file. Until such time as tregions obsoletes this code, I think we should go > with layers instead of scattered conditionals. > > I.e. rename CGOpenMPRuntimeNVPTX to CGOpenMPRuntimeGPU which contains code > that is common to nvptx and amdgcn. That probably uses getGridValue() as a > way to abstract over minor differences. Derive CGOpenMPRuntimeAMDGCN and > CGOpenMPRuntimeNVPTX from CGOpenMPRuntimeGPU to implement (virtual) functions > which are different between the two. Here is an implementation: D83723 <https://reviews.llvm.org/D83723> . It also provides target specific implementation of getNVPTXWarpSize() as proof of concept. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83492/new/ https://reviews.llvm.org/D83492 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits