[PATCH] D102400: [flang] [openmp] Add Fortran specific semantic check 4 for OpenMP Allocate directive.

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 06:31:17 PDT 2021


kiranchandramohan added inline comments.


================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMP.td:43
+def OMP_ALLOCATOR_thread_mem : ClauseVal<"omp_thread_mem_alloc", 8, 1> {}
+def OMP_ALLOCATOR_custom : ClauseVal<"omp_custom_allocator", 9, 1> {}
 def OMPC_Allocator : Clause<"allocator"> {
----------------
The following is the list of allocators found from openmp/runtime/src/kmp_global.cpp. 
1) There is no omp_custom_allocator.
2) There are a few allocators with value above  100.

```
omp_allocator_handle_t const omp_null_allocator = NULL;
omp_allocator_handle_t const omp_default_mem_alloc =
    (omp_allocator_handle_t const)1;
omp_allocator_handle_t const omp_large_cap_mem_alloc =
    (omp_allocator_handle_t const)2;
omp_allocator_handle_t const omp_const_mem_alloc =
    (omp_allocator_handle_t const)3;
omp_allocator_handle_t const omp_high_bw_mem_alloc =
    (omp_allocator_handle_t const)4;
omp_allocator_handle_t const omp_low_lat_mem_alloc =
    (omp_allocator_handle_t const)5;
omp_allocator_handle_t const omp_cgroup_mem_alloc =
    (omp_allocator_handle_t const)6;
omp_allocator_handle_t const omp_pteam_mem_alloc =
    (omp_allocator_handle_t const)7;
omp_allocator_handle_t const omp_thread_mem_alloc =
    (omp_allocator_handle_t const)8;
// Preview of target memory support
omp_allocator_handle_t const llvm_omp_target_host_mem_alloc =
    (omp_allocator_handle_t const)100;
omp_allocator_handle_t const llvm_omp_target_shared_mem_alloc =
    (omp_allocator_handle_t const)101;
omp_allocator_handle_t const llvm_omp_target_device_mem_alloc =
    (omp_allocator_handle_t const)102;
omp_allocator_handle_t const kmp_max_mem_alloc =
    (omp_allocator_handle_t const)1024;
```



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102400/new/

https://reviews.llvm.org/D102400



More information about the llvm-commits mailing list