diff options
author | JF Bastien <jfb@google.com> | 2016-04-06 17:26:42 +0000 |
---|---|---|
committer | JF Bastien <jfb@google.com> | 2016-04-06 17:26:42 +0000 |
commit | 92f4ef10178b8824be6de200a3160c1af532aa1f (patch) | |
tree | 834c1e089848cb74efe196075e74a0410d9819fd /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
parent | c17f7440013d193e33a87af5a56f1b0c7c4846b2 (diff) | |
download | bcm5719-llvm-92f4ef10178b8824be6de200a3160c1af532aa1f.tar.gz bcm5719-llvm-92f4ef10178b8824be6de200a3160c1af532aa1f.zip |
NFC: make AtomicOrdering an enum class
Summary: See LLVM change D18775 for details, this change depends on it.
Reviewers: jyknight, reames
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D18776
llvm-svn: 265569
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index bd208cb4df5..e52e1719c7e 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -2601,8 +2601,9 @@ static void emitSimpleAtomicStore(CodeGenFunction &CGF, bool IsSeqCst, if (LVal.isGlobalReg()) { CGF.EmitStoreThroughGlobalRegLValue(RVal, LVal); } else { - CGF.EmitAtomicStore(RVal, LVal, IsSeqCst ? llvm::SequentiallyConsistent - : llvm::Monotonic, + CGF.EmitAtomicStore(RVal, LVal, + IsSeqCst ? llvm::AtomicOrdering::SequentiallyConsistent + : llvm::AtomicOrdering::Monotonic, LVal.isVolatile(), /*IsInit=*/false); } } @@ -2635,10 +2636,11 @@ static void EmitOMPAtomicReadExpr(CodeGenFunction &CGF, bool IsSeqCst, LValue VLValue = CGF.EmitLValue(V); RValue Res = XLValue.isGlobalReg() ? CGF.EmitLoadOfLValue(XLValue, Loc) - : CGF.EmitAtomicLoad(XLValue, Loc, - IsSeqCst ? llvm::SequentiallyConsistent - : llvm::Monotonic, - XLValue.isVolatile()); + : CGF.EmitAtomicLoad( + XLValue, Loc, + IsSeqCst ? llvm::AtomicOrdering::SequentiallyConsistent + : llvm::AtomicOrdering::Monotonic, + XLValue.isVolatile()); // OpenMP, 2.12.6, atomic Construct // Any atomic construct with a seq_cst clause forces the atomically // performed operation to include an implicit flush operation without a @@ -2794,7 +2796,8 @@ static void EmitOMPAtomicUpdateExpr(CodeGenFunction &CGF, bool IsSeqCst, assert(X->isLValue() && "X of 'omp atomic update' is not lvalue"); LValue XLValue = CGF.EmitLValue(X); RValue ExprRValue = CGF.EmitAnyExpr(E); - auto AO = IsSeqCst ? llvm::SequentiallyConsistent : llvm::Monotonic; + auto AO = IsSeqCst ? llvm::AtomicOrdering::SequentiallyConsistent + : llvm::AtomicOrdering::Monotonic; auto *LHS = cast<OpaqueValueExpr>(BOUE->getLHS()->IgnoreImpCasts()); auto *RHS = cast<OpaqueValueExpr>(BOUE->getRHS()->IgnoreImpCasts()); auto *XRValExpr = IsXLHSInRHSPart ? LHS : RHS; @@ -2843,7 +2846,8 @@ static void EmitOMPAtomicCaptureExpr(CodeGenFunction &CGF, bool IsSeqCst, LValue VLValue = CGF.EmitLValue(V); LValue XLValue = CGF.EmitLValue(X); RValue ExprRValue = CGF.EmitAnyExpr(E); - auto AO = IsSeqCst ? llvm::SequentiallyConsistent : llvm::Monotonic; + auto AO = IsSeqCst ? llvm::AtomicOrdering::SequentiallyConsistent + : llvm::AtomicOrdering::Monotonic; QualType NewVValType; if (UE) { // 'x' is updated with some additional value. @@ -3206,4 +3210,3 @@ void CodeGenFunction::EmitOMPTaskLoopSimdDirective( cast<CapturedStmt>(S.getAssociatedStmt())->getCapturedStmt()); }); } - |