[Mlir-commits] [flang] [llvm] [mlir] [Flang] [OpenMP] [MLIR] Add lowering support for OMP ALLOCATE directives and its clauses (PR #187167)

Tom Eccles llvmlistbot at llvm.org
Wed Mar 18 04:03:54 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);
----------------
tblah wrote:

I don't like putting loads of OpenMP dialect stuff in the LLVMIR module translation unless we absolutely have to. This doesn't scale well if every dialect tried to do this.

Could you use the SaveStack for this?

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


More information about the Mlir-commits mailing list