[Mlir-commits] [flang] [llvm] [mlir] [Flang] [OpenMP] [MLIR] Add lowering support for OMP ALLOCATE directives and its clauses (PR #187167)
Raghu Maddhipatla
llvmlistbot at llvm.org
Tue Mar 31 22:39:39 PDT 2026
================
@@ -272,6 +272,11 @@ class ModuleTranslation {
/// constructed.
llvm::OpenMPIRBuilder *getOpenMPBuilder();
+ /// Registers a pending __kmpc_free call for the given block. These are
+ /// emitted before the block's terminator during block conversion.
+ void registerPendingOmpAllocateFree(Block *block, llvm::Value *ptr,
+ llvm::Value *allocator);
----------------
raghavendhra wrote:
There are some challenges to use SaveStack. Especially for multiple allocate directive statements in the same program unit.
I am now changing my implementation to use interface defined in LLVMTranslationDialectInterface.td so that we can define our implementation in OpenMPToLLVMIRTranslation.cpp and other dialects can also use this interface and this way overhead in ModuleTranslation.cpp is also eliminated.
https://github.com/llvm/llvm-project/pull/187167
More information about the Mlir-commits
mailing list