[Mlir-commits] [clang] [llvm] [mlir] [OMPIRBuilder] always leave PARALLEL via the same barrier (PR #164586)
Michael Kruse
llvmlistbot at llvm.org
Thu Oct 30 05:15:32 PDT 2025
================
@@ -1800,8 +1779,18 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::createParallel(
Instruction *PRegPreFiniTI = PRegPreFiniBB->getTerminator();
InsertPointTy PreFiniIP(PRegPreFiniBB, PRegPreFiniTI->getIterator());
- if (Error Err = FiniCB(PreFiniIP))
- return Err;
+ if (!FiniInfo.FiniBB) {
+ if (Error Err = FiniCB(PreFiniIP))
+ return Err;
+ } else {
+ IRBuilderBase::InsertPointGuard Guard{Builder};
----------------
Meinersbur wrote:
brace-initialization is uncommon in `llvm/`
https://github.com/llvm/llvm-project/pull/164586
More information about the Mlir-commits
mailing list