Displaying 5 results from an estimated 5 matches for "emitblock".
2008 Feb 15
0
[LLVMdev] llvm.atomic.barrier implementation
...; __sync_synchronize after this goes in.
This is the gcc side of 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);
+...
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
2010 Nov 15
0
[LLVMdev] How to create a new Basic block
...blocks. I am using splitedge function. But I am getting the o/p. The
> .ll file is not showing any output.
>
> --
> regards,
> soumya prasad ukil
Hi, AFAIK you'd use the createBasicBlock method of the
llvm::BasicBlock class. If you want to emit it during the code gen
phase the EmitBlock method of the CodeGenFunction class helps.
Thanks,
~Tarek!
2008 Feb 15
2
[LLVMdev] llvm.atomic.barrier implementation
...39;t forget the 80 column rule.
-Chris
>
>
> 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),...
2008 Feb 15
3
[LLVMdev] llvm.atomic.barrier implementation
...vior? What am I missing here?
-Chris
>
>
> 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),...