From 3b1ef29c338890ce55a1990389d8e63f6be7da2c Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Wed, 7 Aug 2013 15:50:44 -0700 Subject: Treat __sync_synchronize and asm("":::"memory") as stronger fences. This is a companion patch to: https://codereview.chromium.org/22240002/ https://codereview.chromium.org/22474008/ and deals with the Clang-side of things. The above patch will handle the fallouts of this Clang patch, including some changes to un-duplicate work that RewriteAsmDirectives.cpp does. The goal of this patch is to force some extra ordering on non-atomics for le32 which LLVM doesn't necessarily provide. R=eliben@chromium.org TEST= ninja check-all BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475 BUG= https://code.google.com/p/nativeclient/issues/detail?id=3611 Review URL: https://codereview.chromium.org/22294002 --- lib/CodeGen/TargetInfo.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/CodeGen/TargetInfo.cpp') diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index f9689affa0..4fb888a767 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -437,6 +437,8 @@ class PNaClTargetCodeGenInfo : public TargetCodeGenInfo { /// For PNaCl we don't want llvm.pow.* intrinsics to be emitted instead /// of library function calls. bool emitIntrinsicForPow() const { return false; } + bool addAsmMemoryAroundSyncSynchronize() const { return true; } // @LOCALMOD + bool asmMemoryIsFence() const { return true; } // @LOCALMOD }; void PNaClABIInfo::computeInfo(CGFunctionInfo &FI) const { -- cgit v1.2.3-70-g09d2