[llvm-branch-commits] [llvm-gcc-branch] r93432 - /llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp

Evan Cheng evan.cheng at apple.com
Thu Jan 14 08:57:46 PST 2010


Author: evancheng
Date: Thu Jan 14 10:57:46 2010
New Revision: 93432

URL: http://llvm.org/viewvc/llvm-project?rev=93432&view=rev
Log:
Merge 93409.

Modified:
    llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp?rev=93432&r1=93431&r2=93432&view=diff

==============================================================================
--- llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/llvm-convert.cpp Thu Jan 14 10:57:46 2010
@@ -4805,10 +4805,20 @@
 #else
   EmitMemoryBarrier(true, true, true, true, true);
 #endif
+
   Value *Result =
     Builder.CreateCall(Intrinsic::getDeclaration(TheModule,  id,
                                                  Ty, 2),
     C, C + 2);
+
+  // The gcc builtins are also full memory barriers.
+  // FIXME: __sync_lock_test_and_set and __sync_lock_release require less.
+#if defined(TARGET_ARM) && defined(CONFIG_DARWIN_H)
+  EmitMemoryBarrier(true, true, true, true, false);
+#else
+  EmitMemoryBarrier(true, true, true, true, true);
+#endif
+
   Result = Builder.CreateIntToPtr(Result, ResultTy);
   return Result;
 }





More information about the llvm-branch-commits mailing list