reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an

arbitrary integer width for the count.

llvm-svn: 59823
This commit is contained in:
Chris Lattner
2008-11-21 16:42:48 +00:00
parent 5d58c3a568
commit dd7083452f
12 changed files with 70 additions and 80 deletions

View File

@@ -257,8 +257,10 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
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_i64);
Intrinsic::memcpy,
Tys, 1);
Value *DestCast = new BitCastInst(NewAlloca, VoidPtrTy, "tmp", TheCall);
Value *SrcCast = new BitCastInst(*AI, VoidPtrTy, "tmp", TheCall);