aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorJF Bastien <jfb@chromium.org>2013-08-07 15:50:54 -0700
committerJF Bastien <jfb@chromium.org>2013-08-07 15:50:54 -0700
commit10c5d2cb2f5611441dae3114e3803526340e4b4b (patch)
tree4c2738773744746b2d690574e8f7663fc1e6bf10 /lib/Analysis
parent0791551c99b041c83413ff78c29cded7730cf601 (diff)
Add the new @llvm.nacl.atomic.fence.all intrinsic
This is a follow-up to: https://codereview.chromium.org/22240002/ And requires the Clang changes from: https://codereview.chromium.org/22294002/ This new intrinsic represents ``asm("":::"~{memory}")`` as well as ``__sync_synchronize()``, and in IR it corresponds to a sequentially-consistent fence surrounded by ``call void asm sideeffect "", "~{memory}"()``. R=jvoung@chromium.org TEST= ninja check-all BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475 Review URL: https://codereview.chromium.org/22474008
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp3
-rw-r--r--lib/Analysis/NaCl/PNaClABIVerifyModule.cpp1
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp b/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp
index e55a9f0df4..94bb691243 100644
--- a/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp
+++ b/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp
@@ -419,7 +419,8 @@ const char *PNaClABIVerifyFunctions::checkInstruction(const Instruction *Inst) {
case Intrinsic::nacl_atomic_store:
case Intrinsic::nacl_atomic_rmw:
case Intrinsic::nacl_atomic_cmpxchg:
- case Intrinsic::nacl_atomic_fence: {
+ case Intrinsic::nacl_atomic_fence:
+ case Intrinsic::nacl_atomic_fence_all: {
// All overloads have memory order and RMW operation in the
// same parameter, arbitrarily use the I32 overload.
Type *T = Type::getInt32Ty(
diff --git a/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp b/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp
index e781680f3f..66cc66b75f 100644
--- a/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp
+++ b/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp
@@ -214,6 +214,7 @@ AllowedIntrinsics::AllowedIntrinsics(LLVMContext *Context) : Context(Context) {
addIntrinsic(Intrinsic::nacl_atomic_cmpxchg, AtomicTypes[T]);
}
addIntrinsic(Intrinsic::nacl_atomic_fence);
+ addIntrinsic(Intrinsic::nacl_atomic_fence_all);
addIntrinsic(Intrinsic::nacl_atomic_is_lock_free);