[llvm-bugs] [Bug 51705] New: variable in allocate directive not being allocated with the default allocator

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 1 11:46:59 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51705

            Bug ID: 51705
           Summary: variable in allocate directive not being allocated
                    with the default allocator
           Product: OpenMP
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kli at ca.ibm.com
                CC: llvm-bugs at lists.llvm.org

In the following code, the variable "y" is not allocated using the default
allocator set in the omp_set_default_allocator called.

#include <omp.h>

int main()
{
  const unsigned alignment = 16;
  omp_memspace_handle_t x_memspace = omp_default_mem_space;
  omp_alloctrait_t x_traits[1] = {omp_atk_alignment, alignment};
  omp_allocator_handle_t x_alloc = omp_init_allocator(x_memspace, 1, x_traits);

  omp_set_default_allocator(x_alloc);
  float x, y;
  #pragma omp allocate(y)
  #pragma omp allocate(x) allocator(x_alloc)
}

IR:
...
  %y = alloca float, align 4
...
  %.x..void.addr = call i8* @__kmpc_alloc(i32 %0, i64 4, i8* %conv2)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210901/96e57332/attachment-0001.html>


More information about the llvm-bugs mailing list