[llvm-branch-commits] [clang] [llvm] [mlir] [OMPIRBuilder] Add support for explicit deallocation points (PR #154752)

Michael Kruse via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 22 04:00:55 PDT 2025


================
@@ -1870,9 +1821,12 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::createParallel(
     };
   }
 
-  OI->OuterAllocaBB = OuterAllocaBlock;
+  OI->OuterAllocBB = OuterAllocaBlock;
   OI->EntryBB = PRegEntryBB;
   OI->ExitBB = PRegExitBB;
+  OI->OuterDeallocBBs.reserve(OuterDeallocIPs.size());
+  for (InsertPointTy DeallocIP : OuterDeallocIPs)
+    OI->OuterDeallocBBs.push_back(DeallocIP.getBlock());
----------------
Meinersbur wrote:

Since we are passing an InsertionPoint, shouldn't we pass the exact position and not just the block assuming that `getFirstInsertionPt()` what the DeallocIP?

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


More information about the llvm-branch-commits mailing list