aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2016-11-16 01:01:22 +0000
committerVitaly Buka <vitalybuka@google.com>2016-11-16 01:01:22 +0000
commit2d15858e406fa13fe5e1444aa49b5567cd18fcea (patch)
treec197431fd92e7cf23e042624477b7573daeac3f7 /clang/lib/CodeGen/CodeGenFunction.h
parent4031e4b95d2e96a6dc607eb37ee1cc6ed6ce2389 (diff)
downloadllvm-2d15858e406fa13fe5e1444aa49b5567cd18fcea.zip
llvm-2d15858e406fa13fe5e1444aa49b5567cd18fcea.tar.gz
llvm-2d15858e406fa13fe5e1444aa49b5567cd18fcea.tar.bz2
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h29
1 files changed, 0 insertions, 29 deletions
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<BreakContinue, 8> BreakContinueStack;
- /// Data for exit block for proper support of OpenMP cancellation constructs.
- struct OMPCancel {
- JumpDest ExitBlock;
- llvm::function_ref<void(CodeGenFunction &CGF)> CodeGen;
- OMPCancel() : CodeGen([](CodeGenFunction &CGF) {}) {}
- };
- SmallVector<OMPCancel, 8> 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