Lines Matching refs:Repl
488 void makeGepsAvailable(Instruction *Repl, BasicBlock *HoistPt,
492 void updateAlignment(Instruction *I, Instruction *Repl);
496 unsigned rauw(const SmallVecInsn &Candidates, Instruction *Repl,
503 unsigned removeAndReplace(const SmallVecInsn &Candidates, Instruction *Repl,
509 bool makeGepOperandsAvailable(Instruction *Repl, BasicBlock *HoistPt,
919 void GVNHoist::makeGepsAvailable(Instruction *Repl, BasicBlock *HoistPt, in makeGepsAvailable() argument
957 Repl->replaceUsesOfWith(Gep, ClonedGep); in makeGepsAvailable()
960 void GVNHoist::updateAlignment(Instruction *I, Instruction *Repl) { in updateAlignment() argument
961 if (auto *ReplacementLoad = dyn_cast<LoadInst>(Repl)) { in updateAlignment()
965 } else if (auto *ReplacementStore = dyn_cast<StoreInst>(Repl)) { in updateAlignment()
969 } else if (auto *ReplacementAlloca = dyn_cast<AllocaInst>(Repl)) { in updateAlignment()
972 } else if (isa<CallInst>(Repl)) { in updateAlignment()
977 unsigned GVNHoist::rauw(const SmallVecInsn &Candidates, Instruction *Repl, in rauw() argument
981 if (I != Repl) { in rauw()
983 updateAlignment(I, Repl); in rauw()
991 Repl->andIRFlags(I); in rauw()
992 combineKnownMetadata(Repl, I); in rauw()
993 I->replaceAllUsesWith(Repl); in rauw()
1018 Instruction *Repl, BasicBlock *DestBB, in removeAndReplace() argument
1020 MemoryUseOrDef *NewMemAcc = MSSA->getMemoryAccess(Repl); in removeAndReplace()
1028 unsigned NR = rauw(Candidates, Repl, NewMemAcc); in removeAndReplace()
1037 Instruction *Repl, BasicBlock *HoistPt, in makeGepOperandsAvailable() argument
1042 if (auto *Ld = dyn_cast<LoadInst>(Repl)) { in makeGepOperandsAvailable()
1044 } else if (auto *St = dyn_cast<StoreInst>(Repl)) { in makeGepOperandsAvailable()
1062 makeGepsAvailable(Repl, HoistPt, InstructionsToHoist, Gep); in makeGepOperandsAvailable()
1065 makeGepsAvailable(Repl, HoistPt, InstructionsToHoist, Val); in makeGepOperandsAvailable()
1077 Instruction *Repl = nullptr; in hoist() local
1083 if (!Repl || firstInBB(I, Repl)) in hoist()
1084 Repl = I; in hoist()
1089 if (Repl) { in hoist()
1091 assert(allOperandsAvailable(Repl, DestBB) && in hoist()
1097 Repl = InstructionsToHoist.front(); in hoist()
1102 if (!allOperandsAvailable(Repl, DestBB)) { in hoist()
1109 if (!makeGepOperandsAvailable(Repl, DestBB, InstructionsToHoist)) in hoist()
1115 MD->removeInstruction(Repl); in hoist()
1116 Repl->moveBefore(Last); in hoist()
1118 DFSNumber[Repl] = DFSNumber[Last]++; in hoist()
1122 Repl->dropLocation(); in hoist()
1123 NR += removeAndReplace(InstructionsToHoist, Repl, DestBB, MoveAccess); in hoist()
1125 if (isa<LoadInst>(Repl)) in hoist()
1127 else if (isa<StoreInst>(Repl)) in hoist()
1129 else if (isa<CallInst>(Repl)) in hoist()