Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
Show First 20 Lines • Show All 1,573 Lines • ▼ Show 20 Lines | if (MergedVal != SI.getOperand(0)) { | ||||
PN->addIncoming(SI.getOperand(0), SI.getParent()); | PN->addIncoming(SI.getOperand(0), SI.getParent()); | ||||
PN->addIncoming(OtherStore->getOperand(0), OtherBB); | PN->addIncoming(OtherStore->getOperand(0), OtherBB); | ||||
MergedVal = InsertNewInstBefore(PN, DestBB->front()); | MergedVal = InsertNewInstBefore(PN, DestBB->front()); | ||||
PN->setDebugLoc(MergedLoc); | PN->setDebugLoc(MergedLoc); | ||||
} | } | ||||
// Advance to a place where it is safe to insert the new store and insert it. | // Advance to a place where it is safe to insert the new store and insert it. | ||||
BBI = DestBB->getFirstInsertionPt(); | BBI = DestBB->getFirstInsertionPt(); | ||||
StoreInst *NewSI = new StoreInst(MergedVal, SI.getOperand(1), | StoreInst *NewSI = new StoreInst(MergedVal, SI.getOperand(1), SI.isVolatile(), | ||||
SI.isVolatile(), SI.getAlignment(), | MaybeAlign(SI.getAlignment()), | ||||
SI.getOrdering(), SI.getSyncScopeID()); | SI.getOrdering(), SI.getSyncScopeID()); | ||||
InsertNewInstBefore(NewSI, *BBI); | InsertNewInstBefore(NewSI, *BBI); | ||||
NewSI->setDebugLoc(MergedLoc); | NewSI->setDebugLoc(MergedLoc); | ||||
// If the two stores had AA tags, merge them. | // If the two stores had AA tags, merge them. | ||||
AAMDNodes AATags; | AAMDNodes AATags; | ||||
SI.getAAMetadata(AATags); | SI.getAAMetadata(AATags); | ||||
if (AATags) { | if (AATags) { | ||||
Show All 9 Lines |