ABataev added inline comments.
================ Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:3489 + OMPRegionInfo->hasCancel()) { + auto IP = CGF.Builder.saveIP(); + llvm::BasicBlock *ExitBB = ---------------- Also, you need to introduce/use RAII that saves/restores insertion point automatically. ================ Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:3492 + CGF.createBasicBlock(".cancel.exit", IP.getBlock()->getParent()); + OMPBuilder->setCancellationBlock(ExitBB); + CGF.Builder.SetInsertPoint(ExitBB); ---------------- Maybe, instead of saving the state, pass the pointer to the cancel block as a parameter to the `CreateBarrier` function? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69922/new/ https://reviews.llvm.org/D69922 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits