================
@@ -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 InsertPointTy is defined in IRBuilder, we'd either have to move it or 
> copy it into the CodeExtractor or store both block and iterator separately 
> for each of these points in the CodeExtractor.

Is it just to avoid `#include <llvm/IR/IRBuilder.h>` in CodeExtractor.h?


>  The reason I didn't do it was that we already discard the specific insert 
> point information for the allocation point, and just pass the block.

If only the block is relevant, a reasonable API passes only the block. Since 
there is precedence/symmetry, consider adding an assertion that checks that the 
IP is pointing to `getFirstInsertionPt()` or at least add a warning about this.

https://github.com/llvm/llvm-project/pull/154752
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to