[cfe-commits] r93611 - /cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Tanya Lattner
tonic at nondot.org
Fri Jan 15 17:21:14 PST 2010
Author: tbrethou
Date: Fri Jan 15 19:21:14 2010
New Revision: 93611
URL: http://llvm.org/viewvc/llvm-project?rev=93611&view=rev
Log:
Add codgen for BI__builtin_llvm_memory_barrier.
Modified:
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=93611&r1=93610&r2=93611&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Fri Jan 15 19:21:14 2010
@@ -556,6 +556,18 @@
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, C + 5);
+ return RValue::get(0);
+ }
+
// Library functions with special handling.
case Builtin::BIsqrt:
case Builtin::BIsqrtf:
More information about the cfe-commits
mailing list