[LLVMdev] llvm memory barrier as a builtin

Duncan Sands baldrick at free.fr
Tue Sep 16 23:22:21 PDT 2008


> I would like access to LLVM memory barrier instruction as a built-in  
> from clang, which means that I need a name for it. In gcc, I see names  
> like __builtin_ia32_mfence but those refers to X86 SSE instruction  
> that we support.  I don't see a gcc name that has the same semantics  
> as our barrier instruction.  For a name,  I was thinking of  
> __builtin_memory_barrier or __builtin_llvm_memory_barrier.  Does  
> anyone object of adding it as built-in or have a better idea for a name?

What are the semantic differences?

Thanks,

Duncan.



More information about the llvm-dev mailing list