[OpenMP][AMDGCN] Support OpenMP offloading for AMDGCN architecture - Part 3
authorSaiyedul Islam <Saiyedul.Islam@amd.com>
Mon, 3 Aug 2020 05:29:48 +0000 (05:29 +0000)
committerSaiyedul Islam <Saiyedul.Islam@amd.com>
Mon, 3 Aug 2020 05:38:39 +0000 (05:38 +0000)
commit160ff83765ac284f3c7dd7b25d4ef105b9952ac0
treebafad248636a86742b0d58e335c539183ef10136
parent40da58a04bea6879e1b52a4ba35559f9d26bee07
[OpenMP][AMDGCN] Support OpenMP offloading for AMDGCN architecture - Part 3

Provides AMDGCN and NVPTX specific specialization of getGPUWarpSize,
getGPUThreadID, and getGPUNumThreads methods. Adds tests for AMDGCN
codegen for these methods in generic and simd modes. Also changes the
precondition in InitTempAlloca to be slightly more permissive. Useful for
AMDGCN OpenMP codegen where allocas are created with a cast to an
address space.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D84260
clang/lib/CodeGen/CGExpr.cpp
clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.cpp [new file with mode: 0644]
clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.h [new file with mode: 0644]
clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h
clang/lib/CodeGen/CMakeLists.txt
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/OpenMP/amdgcn_target_codegen.cpp [new file with mode: 0644]
clang/test/OpenMP/amdgcn_target_init_temp_alloca.cpp [new file with mode: 0644]