[llvm-commits] [llvm] r59809 - in /llvm/trunk: docs/LangRef.html examples/BrainF/BrainF.cpp include/llvm/IntrinsicInst.h include/llvm/Intrinsics.td lib/Analysis/IPA/Andersens.cpp lib/CodeGen/IntrinsicLowering.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Transforms/Scalar/InstructionCombining.cpp lib/Transforms/Scalar/MemCpyOptimizer.cpp lib/Transforms/Scalar/SimplifyLibCalls.cpp lib/Transforms/Utils/InlineFunction.cpp lib/VMCore/Verifier.cpp
Bill Wendling
isanbard at gmail.com
Fri Nov 21 01:09:43 PST 2008
Author: void
Date: Fri Nov 21 03:09:41 2008
New Revision: 59809
URL: http://llvm.org/viewvc/llvm-project?rev=59809&view=rev
Log:
Revert r59802. It was breaking the build of llvm-gcc:
g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/l!
lvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o
./../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
./../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic'
./../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic'
./../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
./../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic'
./../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic'
./../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
./../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic'
./../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic'
make[3]: *** [llvm-convert.o] Error 1
make[3]: *** Waiting for unfinished jobs....
rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
Modified:
llvm/trunk/docs/LangRef.html
llvm/trunk/examples/BrainF/BrainF.cpp
llvm/trunk/include/llvm/IntrinsicInst.h
llvm/trunk/include/llvm/Intrinsics.td
llvm/trunk/lib/Analysis/IPA/Andersens.cpp
llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Fri Nov 21 03:09:41 2008
@@ -5070,13 +5070,7 @@
<div class="doc_text">
<h5>Syntax:</h5>
-<p>This is an overloaded intrinsic. You can use llvm.memcpy on any integer bit
-width. Not all targets support all bit widths however.</p>
<pre>
- declare void @llvm.memcpy.i8(i8 * <dest>, i8 * <src>,
- i8 <len>, i32 <align>)
- declare void @llvm.memcpy.i16(i8 * <dest>, i8 * <src>,
- i16 <len>, i32 <align>)
declare void @llvm.memcpy.i32(i8 * <dest>, i8 * <src>,
i32 <len>, i32 <align>)
declare void @llvm.memcpy.i64(i8 * <dest>, i8 * <src>,
@@ -5130,13 +5124,7 @@
<div class="doc_text">
<h5>Syntax:</h5>
-<p>This is an overloaded intrinsic. You can use llvm.memmove on any integer bit
-width. Not all targets support all bit widths however.</p>
<pre>
- declare void @llvm.memmove.i8(i8 * <dest>, i8 * <src>,
- i8 <len>, i32 <align>)
- declare void @llvm.memmove.i16(i8 * <dest>, i8 * <src>,
- i16 <len>, i32 <align>)
declare void @llvm.memmove.i32(i8 * <dest>, i8 * <src>,
i32 <len>, i32 <align>)
declare void @llvm.memmove.i64(i8 * <dest>, i8 * <src>,
@@ -5191,13 +5179,7 @@
<div class="doc_text">
<h5>Syntax:</h5>
-<p>This is an overloaded intrinsic. You can use llvm.memset on any integer bit
-width. Not all targets support all bit widths however.</p>
<pre>
- declare void @llvm.memset.i8(i8 * <dest>, i8 <val>,
- i8 <len>, i32 <align>)
- declare void @llvm.memset.i16(i8 * <dest>, i8 <val>,
- i16 <len>, i32 <align>)
declare void @llvm.memset.i32(i8 * <dest>, i8 <val>,
i32 <len>, i32 <align>)
declare void @llvm.memset.i64(i8 * <dest>, i8 <val>,
Modified: llvm/trunk/examples/BrainF/BrainF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/BrainF/BrainF.cpp?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/examples/BrainF/BrainF.cpp (original)
+++ llvm/trunk/examples/BrainF/BrainF.cpp Fri Nov 21 03:09:41 2008
@@ -53,9 +53,7 @@
//Function prototypes
//declare void @llvm.memset.i32(i8 *, i8, i32, i32)
- const Type *Tys[] = { Type::Int32Ty };
- Function *memset_func = Intrinsic::getDeclaration(module, Intrinsic::memset,
- Tys, 1);
+ Function *memset_func = Intrinsic::getDeclaration(module, Intrinsic::memset_i32);
//declare i32 @getchar()
getchar_func = cast<Function>(module->
Modified: llvm/trunk/include/llvm/IntrinsicInst.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicInst.h?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IntrinsicInst.h (original)
+++ llvm/trunk/include/llvm/IntrinsicInst.h Fri Nov 21 03:09:41 2008
@@ -208,9 +208,12 @@
static inline bool classof(const MemIntrinsic *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
switch (I->getIntrinsicID()) {
- case Intrinsic::memcpy:
- case Intrinsic::memmove:
- case Intrinsic::memset:
+ case Intrinsic::memcpy_i32:
+ case Intrinsic::memcpy_i64:
+ case Intrinsic::memmove_i32:
+ case Intrinsic::memmove_i64:
+ case Intrinsic::memset_i32:
+ case Intrinsic::memset_i64:
return true;
default: return false;
}
@@ -243,7 +246,8 @@
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const MemCpyInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
- return I->getIntrinsicID() == Intrinsic::memcpy;
+ return I->getIntrinsicID() == Intrinsic::memcpy_i32 ||
+ I->getIntrinsicID() == Intrinsic::memcpy_i64;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
@@ -271,7 +275,8 @@
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const MemMoveInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
- return I->getIntrinsicID() == Intrinsic::memmove;
+ return I->getIntrinsicID() == Intrinsic::memmove_i32 ||
+ I->getIntrinsicID() == Intrinsic::memmove_i64;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
@@ -294,7 +299,8 @@
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const MemSetInst *) { return true; }
static inline bool classof(const IntrinsicInst *I) {
- return I->getIntrinsicID() == Intrinsic::memset;
+ return I->getIntrinsicID() == Intrinsic::memset_i32 ||
+ I->getIntrinsicID() == Intrinsic::memset_i64;
}
static inline bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
Modified: llvm/trunk/include/llvm/Intrinsics.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Intrinsics.td (original)
+++ llvm/trunk/include/llvm/Intrinsics.td Fri Nov 21 03:09:41 2008
@@ -193,15 +193,33 @@
//
let Properties = [IntrWriteArgMem] in {
- def int_memcpy : Intrinsic<[llvm_void_ty],
- [llvm_ptr_ty, llvm_ptr_ty,
- llvm_anyint_ty, llvm_i32_ty]>;
- def int_memmove : Intrinsic<[llvm_void_ty],
- [llvm_ptr_ty, llvm_ptr_ty,
- llvm_anyint_ty, llvm_i32_ty]>;
- def int_memset : Intrinsic<[llvm_void_ty],
- [llvm_ptr_ty, llvm_i8_ty,
- llvm_anyint_ty, llvm_i32_ty]>;
+ def int_memcpy_i16 : Intrinsic<[llvm_void_ty],
+ [llvm_ptr_ty, llvm_ptr_ty,
+ llvm_i16_ty, llvm_i16_ty]>;
+ def int_memcpy_i32 : Intrinsic<[llvm_void_ty],
+ [llvm_ptr_ty, llvm_ptr_ty,
+ llvm_i32_ty, llvm_i32_ty]>;
+ def int_memcpy_i64 : Intrinsic<[llvm_void_ty],
+ [llvm_ptr_ty, llvm_ptr_ty,
+ llvm_i64_ty, llvm_i32_ty]>;
+ def int_memmove_i16 : Intrinsic<[llvm_void_ty],
+ [llvm_ptr_ty, llvm_ptr_ty,
+ llvm_i16_ty, llvm_i16_ty]>;
+ def int_memmove_i32 : Intrinsic<[llvm_void_ty],
+ [llvm_ptr_ty, llvm_ptr_ty,
+ llvm_i32_ty, llvm_i32_ty]>;
+ def int_memmove_i64 : Intrinsic<[llvm_void_ty],
+ [llvm_ptr_ty, llvm_ptr_ty,
+ llvm_i64_ty, llvm_i32_ty]>;
+ def int_memset_i16 : Intrinsic<[llvm_void_ty],
+ [llvm_ptr_ty, llvm_i8_ty,
+ llvm_i16_ty, llvm_i16_ty]>;
+ def int_memset_i32 : Intrinsic<[llvm_void_ty],
+ [llvm_ptr_ty, llvm_i8_ty,
+ llvm_i32_ty, llvm_i32_ty]>;
+ def int_memset_i64 : Intrinsic<[llvm_void_ty],
+ [llvm_ptr_ty, llvm_i8_ty,
+ llvm_i64_ty, llvm_i32_ty]>;
}
// These functions do not actually read memory, but they are sensitive to the
Modified: llvm/trunk/lib/Analysis/IPA/Andersens.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/Andersens.cpp?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/Andersens.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/Andersens.cpp Fri Nov 21 03:09:41 2008
@@ -903,7 +903,8 @@
F->getName() == "atol" || F->getName() == "atoll" ||
F->getName() == "remove" || F->getName() == "unlink" ||
F->getName() == "rename" || F->getName() == "memcmp" ||
- F->getName() == "llvm.memset" ||
+ F->getName() == "llvm.memset.i32" ||
+ F->getName() == "llvm.memset.i64" ||
F->getName() == "strcmp" || F->getName() == "strncmp" ||
F->getName() == "execl" || F->getName() == "execlp" ||
F->getName() == "execle" || F->getName() == "execv" ||
@@ -941,8 +942,8 @@
// These functions do induce points-to edges.
- if (F->getName() == "llvm.memcpy" ||
- F->getName() == "llvm.memmove" ||
+ if (F->getName() == "llvm.memcpy.i32" || F->getName() == "llvm.memcpy.i64" ||
+ F->getName() == "llvm.memmove.i32" ||F->getName() == "llvm.memmove.i64" ||
F->getName() == "memmove") {
// *Dest = *Src, which requires an artificial graph node to represent the
Modified: llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/IntrinsicLowering.cpp Fri Nov 21 03:09:41 2008
@@ -98,19 +98,22 @@
EnsureFunctionExists(M, "abort", I->arg_end(), I->arg_end(),
Type::VoidTy);
break;
- case Intrinsic::memcpy:
+ case Intrinsic::memcpy_i32:
+ case Intrinsic::memcpy_i64:
M.getOrInsertFunction("memcpy", PointerType::getUnqual(Type::Int8Ty),
PointerType::getUnqual(Type::Int8Ty),
PointerType::getUnqual(Type::Int8Ty),
TD.getIntPtrType(), (Type *)0);
break;
- case Intrinsic::memmove:
+ case Intrinsic::memmove_i32:
+ case Intrinsic::memmove_i64:
M.getOrInsertFunction("memmove", PointerType::getUnqual(Type::Int8Ty),
PointerType::getUnqual(Type::Int8Ty),
PointerType::getUnqual(Type::Int8Ty),
TD.getIntPtrType(), (Type *)0);
break;
- case Intrinsic::memset:
+ case Intrinsic::memset_i32:
+ case Intrinsic::memset_i64:
M.getOrInsertFunction("memset", PointerType::getUnqual(Type::Int8Ty),
PointerType::getUnqual(Type::Int8Ty),
Type::Int32Ty,
@@ -781,7 +784,8 @@
case Intrinsic::var_annotation:
break; // Strip out annotate intrinsic
- case Intrinsic::memcpy: {
+ case Intrinsic::memcpy_i32:
+ case Intrinsic::memcpy_i64: {
static Constant *MemcpyFCache = 0;
Value *Size = CI->getOperand(3);
const Type *IntPtr = TD.getIntPtrType();
@@ -799,7 +803,8 @@
MemcpyFCache);
break;
}
- case Intrinsic::memmove: {
+ case Intrinsic::memmove_i32:
+ case Intrinsic::memmove_i64: {
static Constant *MemmoveFCache = 0;
Value *Size = CI->getOperand(3);
const Type *IntPtr = TD.getIntPtrType();
@@ -817,7 +822,8 @@
MemmoveFCache);
break;
}
- case Intrinsic::memset: {
+ case Intrinsic::memset_i32:
+ case Intrinsic::memset_i64: {
static Constant *MemsetFCache = 0;
Value *Size = CI->getOperand(3);
const Type *IntPtr = TD.getIntPtrType();
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Fri Nov 21 03:09:41 2008
@@ -3663,7 +3663,8 @@
case Intrinsic::longjmp:
return "_longjmp"+!TLI.usesUnderscoreLongJmp();
break;
- case Intrinsic::memcpy: {
+ case Intrinsic::memcpy_i32:
+ case Intrinsic::memcpy_i64: {
SDValue Op1 = getValue(I.getOperand(1));
SDValue Op2 = getValue(I.getOperand(2));
SDValue Op3 = getValue(I.getOperand(3));
@@ -3672,7 +3673,8 @@
I.getOperand(1), 0, I.getOperand(2), 0));
return 0;
}
- case Intrinsic::memset: {
+ case Intrinsic::memset_i32:
+ case Intrinsic::memset_i64: {
SDValue Op1 = getValue(I.getOperand(1));
SDValue Op2 = getValue(I.getOperand(2));
SDValue Op3 = getValue(I.getOperand(3));
@@ -3681,7 +3683,8 @@
I.getOperand(1), 0));
return 0;
}
- case Intrinsic::memmove: {
+ case Intrinsic::memmove_i32:
+ case Intrinsic::memmove_i64: {
SDValue Op1 = getValue(I.getOperand(1));
SDValue Op2 = getValue(I.getOperand(2));
SDValue Op3 = getValue(I.getOperand(3));
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Fri Nov 21 03:09:41 2008
@@ -9200,11 +9200,12 @@
if (GlobalVariable *GVSrc = dyn_cast<GlobalVariable>(MMI->getSource()))
if (GVSrc->isConstant()) {
Module *M = CI.getParent()->getParent()->getParent();
- Intrinsic::ID MemCpyID = Intrinsic::memcpy;
- const Type *Tys[1];
- Tys[0] = CI.getOperand(3)->getType();
- CI.setOperand(0,
- Intrinsic::getDeclaration(M, MemCpyID, Tys, 1));
+ Intrinsic::ID MemCpyID;
+ if (CI.getOperand(3)->getType() == Type::Int32Ty)
+ MemCpyID = Intrinsic::memcpy_i32;
+ else
+ MemCpyID = Intrinsic::memcpy_i64;
+ CI.setOperand(0, Intrinsic::getDeclaration(M, MemCpyID));
Changed = true;
}
Modified: llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp Fri Nov 21 03:09:41 2008
@@ -427,12 +427,9 @@
// instruction needed by the start of the block.
BasicBlock::iterator InsertPt = BI;
- if (MemSetF == 0) {
- const Type *Tys[] = {Type::Int64Ty};
+ if (MemSetF == 0)
MemSetF = Intrinsic::getDeclaration(SI->getParent()->getParent()
- ->getParent(), Intrinsic::memset,
- Tys, 1);
- }
+ ->getParent(), Intrinsic::memset_i64);
// Get the starting pointer of the block.
StartPtr = Range.StartPtr;
@@ -674,11 +671,9 @@
return false;
// If all checks passed, then we can transform these memcpy's
- const Type *Tys[1];
- Tys[0] = M->getLength()->getType();
Function* MemCpyFun = Intrinsic::getDeclaration(
M->getParent()->getParent()->getParent(),
- M->getIntrinsicID(), Tys, 1);
+ M->getIntrinsicID());
std::vector<Value*> args;
args.push_back(M->getRawDest());
Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Fri Nov 21 03:09:41 2008
@@ -130,10 +130,9 @@
Value *LibCallOptimization::EmitMemCpy(Value *Dst, Value *Src, Value *Len,
unsigned Align, IRBuilder<> &B) {
Module *M = Caller->getParent();
- Intrinsic::ID IID = Intrinsic::memcpy;
- const Type *Tys[1];
- Tys[0] = Len->getType();
- Value *MemCpy = Intrinsic::getDeclaration(M, IID, Tys, 1);
+ Intrinsic::ID IID = Len->getType() == Type::Int32Ty ?
+ Intrinsic::memcpy_i32 : Intrinsic::memcpy_i64;
+ Value *MemCpy = Intrinsic::getDeclaration(M, IID);
return B.CreateCall4(MemCpy, CastToCStr(Dst, B), CastToCStr(Src, B), Len,
ConstantInt::get(Type::Int32Ty, Align));
}
Modified: llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp Fri Nov 21 03:09:41 2008
@@ -257,10 +257,8 @@
Value *NewAlloca = new AllocaInst(AggTy, 0, Align, I->getName(),
Caller->begin()->begin());
// Emit a memcpy.
- const Type *Tys[] = { Type::Int64Ty };
Function *MemCpyFn = Intrinsic::getDeclaration(Caller->getParent(),
- Intrinsic::memcpy,
- Tys, 1);
+ Intrinsic::memcpy_i64);
Value *DestCast = new BitCastInst(NewAlloca, VoidPtrTy, "tmp", TheCall);
Value *SrcCast = new BitCastInst(*AI, VoidPtrTy, "tmp", TheCall);
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=59809&r1=59808&r2=59809&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Fri Nov 21 03:09:41 2008
@@ -1336,9 +1336,12 @@
switch (ID) {
default:
break;
- case Intrinsic::memcpy:
- case Intrinsic::memmove:
- case Intrinsic::memset:
+ case Intrinsic::memcpy_i32:
+ case Intrinsic::memcpy_i64:
+ case Intrinsic::memmove_i32:
+ case Intrinsic::memmove_i64:
+ case Intrinsic::memset_i32:
+ case Intrinsic::memset_i64:
Assert1(isa<ConstantInt>(CI.getOperand(4)),
"alignment argument of memory intrinsics must be a constant int",
&CI);
More information about the llvm-commits
mailing list