aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-02-13 07:55:47 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-02-13 07:55:47 +0000
commitabc482effcabd373f5c96fb8f9dd493968a112dd (patch)
tree2b1eb59e9ebf337925c18d2ad7537c0d60995c27 /clang/lib/CodeGen/CodeGenFunction.h
parent2a903b900d212dfaf5482408042a6f7b9e87c9a6 (diff)
downloadllvm-abc482effcabd373f5c96fb8f9dd493968a112dd.zip
llvm-abc482effcabd373f5c96fb8f9dd493968a112dd.tar.gz
llvm-abc482effcabd373f5c96fb8f9dd493968a112dd.tar.bz2
MS ABI: Implement /volatile:ms
The /volatile:ms semantics turn volatile loads and stores into atomic acquire and release operations. This distinction is important because volatile memory operations do not form a happens-before relationship with non-atomic memory. This means that a volatile store is not sufficient for implementing a mutex unlock routine. Differential Revision: http://reviews.llvm.org/D7580 llvm-svn: 229082
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 12f066b..ea8166b 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -2147,11 +2147,21 @@ public:
void EmitAtomicInit(Expr *E, LValue lvalue);
+ bool LValueIsSuitableForInlineAtomic(LValue Src);
+ bool typeIsSuitableForInlineAtomic(QualType Ty, bool IsVolatile) const;
+
+ RValue EmitAtomicLoad(LValue LV, SourceLocation SL,
+ AggValueSlot Slot = AggValueSlot::ignored());
+
RValue EmitAtomicLoad(LValue lvalue, SourceLocation loc,
+ llvm::AtomicOrdering AO, bool IsVolatile = false,
AggValueSlot slot = AggValueSlot::ignored());
void EmitAtomicStore(RValue rvalue, LValue lvalue, bool isInit);
+ void EmitAtomicStore(RValue rvalue, LValue lvalue, llvm::AtomicOrdering AO,
+ bool IsVolatile, bool isInit);
+
std::pair<RValue, RValue> EmitAtomicCompareExchange(
LValue Obj, RValue Expected, RValue Desired, SourceLocation Loc,
llvm::AtomicOrdering Success = llvm::SequentiallyConsistent,