From 2d15858e406fa13fe5e1444aa49b5567cd18fcea Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 16 Nov 2016 01:01:22 +0000 Subject: Revert "[OPENMP] Fixed codegen for 'omp cancel' construct." Summary: r286944 introduced bugs detected by ASAN as use-after-return. r287025 have not fixed them completely. This reverts commit r286944 and r287025. Reviewers: ABataev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26720 llvm-svn: 287069 --- clang/lib/CodeGen/CodeGenFunction.h | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.h') diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 6e97452..e5ca9bc 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -982,35 +982,6 @@ private: }; SmallVector BreakContinueStack; - /// Data for exit block for proper support of OpenMP cancellation constructs. - struct OMPCancel { - JumpDest ExitBlock; - llvm::function_ref CodeGen; - OMPCancel() : CodeGen([](CodeGenFunction &CGF) {}) {} - }; - SmallVector OMPCancelStack; - - /// Controls insertion of cancellation exit blocks in worksharing constructs. - class OMPCancelStackRAII { - CodeGenFunction &CGF; - - public: - OMPCancelStackRAII(CodeGenFunction &CGF) : CGF(CGF) { - CGF.OMPCancelStack.push_back({}); - } - ~OMPCancelStackRAII() { - if (CGF.HaveInsertPoint() && - CGF.OMPCancelStack.back().ExitBlock.isValid()) { - auto CJD = CGF.getJumpDestInCurrentScope("cancel.cont"); - CGF.EmitBranchThroughCleanup(CJD); - CGF.EmitBlock(CGF.OMPCancelStack.back().ExitBlock.getBlock()); - CGF.OMPCancelStack.back().CodeGen(CGF); - CGF.EmitBranchThroughCleanup(CJD); - CGF.EmitBlock(CJD.getBlock()); - } - } - }; - CodeGenPGO PGO; /// Calculate branch weights appropriate for PGO data -- cgit v1.1