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

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Wed Mar 18 04:03:55 PDT 2026


================
@@ -1048,6 +1072,10 @@ LogicalResult ModuleTranslation::convertBlockImpl(Block &bb,
 
   // Traverse operations.
   for (auto &op : bb) {
+    // Emit pending OpenMP allocate frees before the terminator.
+    if (op.hasTrait<OpTrait::IsTerminator>())
+      emitPendingOmpAllocateFrees(bb, builder);
+
----------------
tblah wrote:

This file contains common translation infrastructure for many different dialects into LLVM-IR. Please avoid adding OpenMP specific code as much as possible.

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


More information about the flang-commits mailing list