[llvm-commits] [dragonegg] r133259 - /dragonegg/trunk/src/Convert.cpp
Duncan Sands
baldrick at free.fr
Fri Jun 17 08:11:00 PDT 2011
Author: baldrick
Date: Fri Jun 17 10:11:00 2011
New Revision: 133259
URL: http://llvm.org/viewvc/llvm-project?rev=133259&view=rev
Log:
Port commit 132977 (prefetch intrinsic gained a new argument) from clang.
Modified:
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=133259&r1=133258&r2=133259&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Fri Jun 17 10:11:00 2011
@@ -5080,6 +5080,7 @@
Value *Ptr = EmitMemory(gimple_call_arg(stmt, 0));
Value *ReadWrite = 0;
Value *Locality = 0;
+ Value *Data = 0;
if (gimple_call_num_args(stmt) > 1) { // Args 1/2 are optional
ReadWrite = EmitMemory(gimple_call_arg(stmt, 1));
@@ -5117,12 +5118,13 @@
ReadWrite = Builder.getInt32(0);
if (Locality == 0)
Locality = Builder.getInt32(3);
+ if (Data == 0)
+ Data = Builder.getInt32(1);
Ptr = Builder.CreateBitCast(Ptr, Type::getInt8PtrTy(Context));
- Value *Ops[3] = { Ptr, ReadWrite, Locality };
- Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::prefetch),
- Ops, Ops+3);
+ Builder.CreateCall4(Intrinsic::getDeclaration(TheModule, Intrinsic::prefetch),
+ Ptr, ReadWrite, Locality, Data);
return true;
}
More information about the llvm-commits
mailing list