1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[MemCpyOpt] Pass Instruction to IRBuilder, no need for NextNode. NFC.

We're erasing the instructions anyway.

llvm-svn: 237861
This commit is contained in:
Ahmed Bougacha 2015-05-21 00:08:35 +00:00
parent 7398c4c824
commit cdd59eb5a7

View File

@ -874,7 +874,7 @@ bool MemCpyOpt::processMemSetMemCpyDependence(MemCpyInst *MemCpy,
if (ConstantInt *SrcSizeC = dyn_cast<ConstantInt>(SrcSize))
Align = MinAlign(SrcSizeC->getZExtValue(), DestAlign);
IRBuilder<> Builder(MemSet->getNextNode());
IRBuilder<> Builder(MemSet);
// If the sizes have different types, zext the smaller one.
if (DestSize->getType() != SrcSize->getType()) {
@ -924,7 +924,7 @@ bool MemCpyOpt::performMemCpyToMemSetOptzn(MemCpyInst *MemCpy,
if (!MemSetSize || CopySize->getZExtValue() > MemSetSize->getZExtValue())
return false;
IRBuilder<> Builder(MemCpy->getNextNode());
IRBuilder<> Builder(MemCpy);
Builder.CreateMemSet(MemCpy->getRawDest(), MemSet->getOperand(1),
CopySize, MemCpy->getAlignment());
return true;