[Mlir-commits] [mlir] [MLIR] [OpenMP] Initial support for OMP ALLOCATE directive op. (PR #147900)
Raghu Maddhipatla
llvmlistbot at llvm.org
Tue Jul 15 06:37:26 PDT 2025
raghavendhra wrote:
> > > How do you plan to use this allocate directive operation, given that this is a declarative directive, and should override the allocation of the native language dialect?
> >
> >
> > Yes, it is more targeted towards overriding default memory allocation and allocating variable or set of variables, especially useful in heterogeneous systems (e.g., CPU + GPU) or when dealing with performance tuning to give flexibility to programmer.
>
> What I wanted to understand is whether this operation needs to be handled differently, given that it controls memory allocation. In the case of privatization and reduction, we represent privatized variables as block arguments to control how they’re materialized or allocated. Should the allocate operation follow a similar approach?
>
> Also, do you plan to remove or replace the allocations currently inserted by the default FIR codegen?
I am trying to mimic clang behavior for omp allocate directive, clang uses call @__kmpc_alloc() and @__kmpc_free() while leaving the region along with existing alloca.
https://github.com/llvm/llvm-project/pull/147900
More information about the Mlir-commits
mailing list