[PATCH] D79257: [OPENMP50]Codegen for uses_allocators clause.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 1 17:16:46 PDT 2020


ABataev created this revision.
ABataev added a reviewer: jdoerfert.
Herald added subscribers: guansong, yaxunl, jholewinski.
Herald added a reviewer: aaron.ballman.
Herald added a project: clang.
ABataev added a parent revision: D79186: [OPENMP]Consider 'omp_null_allocator' as a predefined allocator..

Predefined allocators should not be mapped at all (they are just enumeric
constants). FOr user-defined allocators need to map the traits only as
firstprivates, the allocator itself is private.
At the beginning of the target region the user-defined allocatores must
be created and then destroyed at the end of the target region:

  omp_allocator_handle_t my_allocator = __kmpc_init_allocator(<gtid>,
  /*default memhandle*/ 0, <number_of_traits>, &<traits>);
  ...
  call void @__kmpc_destroy_allocator(<gtid>, my_allocator);


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79257

Files:
  clang/include/clang/Basic/Attr.td
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/lib/CodeGen/CGOpenMPRuntime.h
  clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/OpenMP/allocate_allocator_ast_print.cpp
  clang/test/OpenMP/allocate_allocator_messages.cpp
  clang/test/OpenMP/master_taskloop_firstprivate_messages.cpp
  clang/test/OpenMP/master_taskloop_in_reduction_messages.cpp
  clang/test/OpenMP/master_taskloop_lastprivate_messages.cpp
  clang/test/OpenMP/master_taskloop_private_messages.cpp
  clang/test/OpenMP/master_taskloop_reduction_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_firstprivate_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_in_reduction_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_lastprivate_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_linear_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_private_messages.cpp
  clang/test/OpenMP/master_taskloop_simd_reduction_messages.cpp
  clang/test/OpenMP/nvptx_allocate_codegen.cpp
  clang/test/OpenMP/nvptx_allocate_messages.cpp
  clang/test/OpenMP/parallel_master_codegen.cpp
  clang/test/OpenMP/parallel_master_taskloop_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_lastprivate_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_private_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_reduction_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_firstprivate_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_lastprivate_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_linear_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_private_messages.cpp
  clang/test/OpenMP/parallel_master_taskloop_simd_reduction_messages.cpp
  clang/test/OpenMP/target_ast_print.cpp
  clang/test/OpenMP/target_firstprivate_messages.cpp
  clang/test/OpenMP/target_parallel_ast_print.cpp
  clang/test/OpenMP/target_parallel_firstprivate_messages.cpp
  clang/test/OpenMP/target_parallel_for_ast_print.cpp
  clang/test/OpenMP/target_parallel_for_firstprivate_messages.cpp
  clang/test/OpenMP/target_parallel_for_lastprivate_messages.cpp
  clang/test/OpenMP/target_parallel_for_linear_messages.cpp
  clang/test/OpenMP/target_parallel_for_private_messages.cpp
  clang/test/OpenMP/target_parallel_for_reduction_messages.cpp
  clang/test/OpenMP/target_parallel_for_simd_ast_print.cpp
  clang/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp
  clang/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp
  clang/test/OpenMP/target_parallel_for_simd_linear_messages.cpp
  clang/test/OpenMP/target_parallel_for_simd_private_messages.cpp
  clang/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp
  clang/test/OpenMP/target_parallel_for_simd_uses_allocators_codegen.cpp
  clang/test/OpenMP/target_parallel_for_uses_allocators_codegen.cpp
  clang/test/OpenMP/target_parallel_private_messages.cpp
  clang/test/OpenMP/target_parallel_reduction_messages.cpp
  clang/test/OpenMP/target_parallel_uses_allocators_codegen.cpp
  clang/test/OpenMP/target_private_messages.cpp
  clang/test/OpenMP/target_reduction_messages.cpp
  clang/test/OpenMP/target_simd_ast_print.cpp
  clang/test/OpenMP/target_simd_firstprivate_messages.cpp
  clang/test/OpenMP/target_simd_lastprivate_messages.cpp
  clang/test/OpenMP/target_simd_linear_messages.cpp
  clang/test/OpenMP/target_simd_private_messages.cpp
  clang/test/OpenMP/target_simd_reduction_messages.cpp
  clang/test/OpenMP/target_simd_uses_allocators_codegen.cpp
  clang/test/OpenMP/target_teams_ast_print.cpp
  clang/test/OpenMP/target_teams_distribute_ast_print.cpp
  clang/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_ast_print.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_simd_ast_print.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_simd_uses_allocators_codegen.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_uses_allocators_codegen.cpp
  clang/test/OpenMP/target_teams_distribute_private_messages.cpp
  clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp
  clang/test/OpenMP/target_teams_distribute_simd_ast_print.cpp
  clang/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp
  clang/test/OpenMP/target_teams_distribute_simd_private_messages.cpp
  clang/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp
  clang/test/OpenMP/target_teams_distribute_simd_uses_allocators_codegen.cpp
  clang/test/OpenMP/target_teams_distribute_uses_allocators_codegen.cpp
  clang/test/OpenMP/target_teams_firstprivate_messages.cpp
  clang/test/OpenMP/target_teams_private_messages.cpp
  clang/test/OpenMP/target_teams_reduction_messages.cpp
  clang/test/OpenMP/target_teams_uses_allocators_codegen.cpp
  clang/test/OpenMP/target_uses_allocators_codegen.cpp
  clang/test/OpenMP/target_uses_allocators_messages.cpp
  clang/test/OpenMP/task_firstprivate_messages.cpp
  clang/test/OpenMP/task_in_reduction_codegen.cpp
  clang/test/OpenMP/task_in_reduction_message.cpp
  clang/test/OpenMP/task_private_messages.cpp
  clang/test/OpenMP/taskgroup_task_reduction_codegen.cpp
  clang/test/OpenMP/taskloop_firstprivate_messages.cpp
  clang/test/OpenMP/taskloop_in_reduction_messages.cpp
  clang/test/OpenMP/taskloop_lastprivate_messages.cpp
  clang/test/OpenMP/taskloop_private_messages.cpp
  clang/test/OpenMP/taskloop_reduction_messages.cpp
  clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp
  clang/test/OpenMP/taskloop_simd_in_reduction_messages.cpp
  clang/test/OpenMP/taskloop_simd_lastprivate_messages.cpp
  clang/test/OpenMP/taskloop_simd_linear_messages.cpp
  clang/test/OpenMP/taskloop_simd_private_messages.cpp
  clang/test/OpenMP/taskloop_simd_reduction_messages.cpp
  clang/test/OpenMP/teams_distribute_ast_print.cpp
  clang/test/PCH/chain-openmp-allocate.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79257.261520.patch
Type: text/x-patch
Size: 122938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200502/b5a10540/attachment-0001.bin>


More information about the cfe-commits mailing list