jdoerfert created this revision. jdoerfert added reviewers: ABataev, JonChesterfield, ggeorgakoudis, tianshilei1992. Herald added subscribers: jfb, guansong, hiraditya, yaxunl. Herald added a reviewer: bollu. jdoerfert requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, sstefan1. Herald added projects: clang, OpenMP, LLVM.
In the spirit of TRegions [0], this patch provides a simpler and uniform interface for a kernel to set up the device runtime. The OMPIRBuilder is used for reuse in Flang. A custom state machine will be generated in the follow up patch. The "surplus" threads of the "master warp" will not exit early anymore so we need to use non-aligned barriers. The new runtime will not have an extra warp but also require these non-aligned barriers. [0] https://link.springer.com/chapter/10.1007/978-3-030-28596-8_11 This was in parts extracted from D59319 <https://reviews.llvm.org/D59319>. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D101976 Files: clang/lib/AST/ItaniumMangle.cpp clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/lib/CodeGen/CGOpenMPRuntimeGPU.h clang/test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp clang/test/OpenMP/nvptx_multi_target_parallel_codegen.cpp clang/test/OpenMP/nvptx_nested_parallel_codegen.cpp clang/test/OpenMP/nvptx_parallel_codegen.cpp clang/test/OpenMP/nvptx_parallel_for_codegen.cpp clang/test/OpenMP/nvptx_target_codegen.cpp clang/test/OpenMP/nvptx_target_parallel_codegen.cpp clang/test/OpenMP/nvptx_target_parallel_num_threads_codegen.cpp clang/test/OpenMP/nvptx_target_printf_codegen.c clang/test/OpenMP/nvptx_target_teams_codegen.cpp clang/test/OpenMP/nvptx_target_teams_distribute_codegen.cpp clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_generic_mode_codegen.cpp clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_simd_codegen.cpp clang/test/OpenMP/nvptx_teams_codegen.cpp clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp clang/test/OpenMP/target_parallel_debug_codegen.cpp clang/test/OpenMP/target_parallel_for_debug_codegen.cpp llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h llvm/include/llvm/Frontend/OpenMP/OMPKinds.def llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp openmp/libomptarget/deviceRTLs/common/include/target.h openmp/libomptarget/deviceRTLs/common/src/omptarget.cu openmp/libomptarget/deviceRTLs/common/src/parallel.cu openmp/libomptarget/deviceRTLs/interface.h openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits