[Mlir-commits] [mlir] [MLIR] [OpenMP] Modify definition of ALLOCATOR clause to support allocator type defined in user program. (PR #157399)

Raghu Maddhipatla llvmlistbot at llvm.org
Tue Sep 9 12:01:55 PDT 2025


raghavendhra wrote:

> Thank you for adding the test. Why did you decide to go with an integer attribute for the user defined allocator handle?

For predefined allocator_handle_kinds, they are defined as integer kind as per OpenMP Spec and in openmp/runtime https://github.com/llvm/llvm-project/blob/b6be44ad0deeb86e920873de87875d2eaa6c2d8b/openmp/runtime/src/include/omp_lib.F90.var#L180C9-L188C96

And, `omp_init_allocator()` routine also returns allocator_handle type which is in turn an integer type as per OpenMP Spec 

So used integer attribute to be consistent.



https://github.com/llvm/llvm-project/pull/157399


More information about the Mlir-commits mailing list