[llvm-commits] [llvm-gcc-4.2] r47205 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Fri Feb 15 17:27:29 PST 2008
Author: alenhar2
Date: Fri Feb 15 19:27:28 2008
New Revision: 47205
URL: http://llvm.org/viewvc/llvm-project?rev=47205&view=rev
Log:
llvm.memory.barrier for __sync_syncronize
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=47205&r1=47204&r2=47205&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Feb 15 19:27:28 2008
@@ -4293,6 +4293,18 @@
return true;
}
+ case BUILT_IN_SYNCHRONIZE: {
+ // We assume like gcc appears to, that this only applies to cached memory.
+ Value* C[5];
+ C[0] = C[1] = C[2] = C[3] = ConstantInt::get(Type::Int1Ty, 1);
+ C[4] = ConstantInt::get(Type::Int1Ty, 0);
+
+ Builder.CreateCall(Intrinsic::getDeclaration(TheModule,
+ Intrinsic::memory_barrier),
+ C, C + 5);
+ return true;
+ }
+
#if 1 // FIXME: Should handle these GCC extensions eventually.
case BUILT_IN_APPLY_ARGS:
case BUILT_IN_APPLY:
More information about the llvm-commits
mailing list