Displaying 4 results from an estimated 4 matches for "built_in_synchronize".
2008 Feb 15
0
[LLVMdev] llvm.atomic.barrier implementation
...the patch.
Index: gcc/llvm-convert.cpp
===================================================================
--- gcc/llvm-convert.cpp (revision 46956)
+++ gcc/llvm-convert.cpp (working copy)
@@ -4260,6 +4260,15 @@
EmitBlock(new BasicBlock(""));
return true;
+ case BUILT_IN_SYNCHRONIZE: {
+ Value* C[4];
+ C[0] = C[1] = C[2] = C[3] = ConstantInt::get(Type::Int1Ty, 1);
+
+ Builder.CreateCall(Intrinsic::getDeclaration(TheModule,
Intrinsic::atomic_membarrier),
+ C, C + 4);
+ return true;
+ }
+
#if 1 // FIXME: Should handle these GCC extensions eve...
2008 Feb 15
6
[LLVMdev] llvm.atomic.barrier implementation
Attached is the target independent llvm.atomic.barrier support, as
well as alpha and x86 (sse2) support. This matches Chandler's
definitions, and the LangRef patch will just restore that. Non-sse2
barrier will be needed, I think it is "lock; mov %esp, %esp", but I'm
not sure.
Any objections? I'll take a hack at the front end support for
__sync_synchronize after this
2008 Feb 15
2
[LLVMdev] llvm.atomic.barrier implementation
...pp
> ===================================================================
> --- gcc/llvm-convert.cpp (revision 46956)
> +++ gcc/llvm-convert.cpp (working copy)
> @@ -4260,6 +4260,15 @@
> EmitBlock(new BasicBlock(""));
> return true;
>
> + case BUILT_IN_SYNCHRONIZE: {
> + Value* C[4];
> + C[0] = C[1] = C[2] = C[3] = ConstantInt::get(Type::Int1Ty, 1);
> +
> + Builder.CreateCall(Intrinsic::getDeclaration(TheModule,
> Intrinsic::atomic_membarrier),
> + C, C + 4);
> + return true;
> + }
> +
> #if 1...
2008 Feb 15
3
[LLVMdev] llvm.atomic.barrier implementation
...pp
> ===================================================================
> --- gcc/llvm-convert.cpp (revision 46956)
> +++ gcc/llvm-convert.cpp (working copy)
> @@ -4260,6 +4260,15 @@
> EmitBlock(new BasicBlock(""));
> return true;
>
> + case BUILT_IN_SYNCHRONIZE: {
> + Value* C[4];
> + C[0] = C[1] = C[2] = C[3] = ConstantInt::get(Type::Int1Ty, 1);
> +
> + Builder.CreateCall(Intrinsic::getDeclaration(TheModule,
> Intrinsic::atomic_membarrier),
> + C, C + 4);
> + return true;
> + }
> +
> #if 1...