]> granicus.if.org Git - clang/commitdiff
llvm.memory.barrier is going away; remove the wrapper intrinsic __builtin_llvm_memory...
authorEli Friedman <eli.friedman@gmail.com>
Thu, 6 Oct 2011 23:12:03 +0000 (23:12 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 6 Oct 2011 23:12:03 +0000 (23:12 +0000)
__atomic_thread_fence will be landing soon as a replacement, wrapping around the new fence instruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141332 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Builtins.def
lib/CodeGen/CGBuiltin.cpp

index eb5c604294b31bc495b9577384a0fd144149b895..50b51c7a4f7b0732be1cb41d0a91302903336909 100644 (file)
@@ -589,8 +589,6 @@ BUILTIN(__sync_swap_16, "LLLiLLLiD*LLLi.", "n")
 
 // Non-overloaded atomic builtins.
 BUILTIN(__sync_synchronize, "v.", "n")
-// LLVM instruction builtin [Clang extension].
-BUILTIN(__builtin_llvm_memory_barrier,"vbbbbb", "n")
 // GCC does not support these, they are a Clang extension.
 BUILTIN(__sync_fetch_and_min, "iiD*i", "n")
 BUILTIN(__sync_fetch_and_max, "iiD*i", "n")
index dfe4c4ce9994ddb2f0f1912eb2d4fdf86fc87996..3ec4efef769b8cadb6a52dc4275409ddf053f955 100644 (file)
@@ -951,18 +951,6 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
     return RValue::get(0);
   }
 
-  case Builtin::BI__builtin_llvm_memory_barrier: {
-    Value *C[5] = {
-      EmitScalarExpr(E->getArg(0)),
-      EmitScalarExpr(E->getArg(1)),
-      EmitScalarExpr(E->getArg(2)),
-      EmitScalarExpr(E->getArg(3)),
-      EmitScalarExpr(E->getArg(4))
-    };
-    Builder.CreateCall(CGM.getIntrinsic(Intrinsic::memory_barrier), C);
-    return RValue::get(0);
-  }
-      
     // Library functions with special handling.
   case Builtin::BIsqrt:
   case Builtin::BIsqrtf: