Lines Matching refs:Repl
476 void makeGepsAvailable(Instruction *Repl, BasicBlock *HoistPt,
480 void updateAlignment(Instruction *I, Instruction *Repl);
484 unsigned rauw(const SmallVecInsn &Candidates, Instruction *Repl,
491 unsigned removeAndReplace(const SmallVecInsn &Candidates, Instruction *Repl,
497 bool makeGepOperandsAvailable(Instruction *Repl, BasicBlock *HoistPt,
907 void GVNHoist::makeGepsAvailable(Instruction *Repl, BasicBlock *HoistPt, in makeGepsAvailable() argument
953 Repl->replaceUsesOfWith(Gep, ClonedGep); in makeGepsAvailable()
956 void GVNHoist::updateAlignment(Instruction *I, Instruction *Repl) { in updateAlignment() argument
957 if (auto *ReplacementLoad = dyn_cast<LoadInst>(Repl)) { in updateAlignment()
961 } else if (auto *ReplacementStore = dyn_cast<StoreInst>(Repl)) { in updateAlignment()
965 } else if (auto *ReplacementAlloca = dyn_cast<AllocaInst>(Repl)) { in updateAlignment()
968 } else if (isa<CallInst>(Repl)) { in updateAlignment()
973 unsigned GVNHoist::rauw(const SmallVecInsn &Candidates, Instruction *Repl, in rauw() argument
977 if (I != Repl) { in rauw()
979 updateAlignment(I, Repl); in rauw()
987 combineMetadataForCSE(Repl, I, true); in rauw()
988 Repl->andIRFlags(I); in rauw()
989 I->replaceAllUsesWith(Repl); in rauw()
1014 Instruction *Repl, BasicBlock *DestBB, in removeAndReplace() argument
1016 MemoryUseOrDef *NewMemAcc = MSSA->getMemoryAccess(Repl); in removeAndReplace()
1024 unsigned NR = rauw(Candidates, Repl, NewMemAcc); in removeAndReplace()
1033 Instruction *Repl, BasicBlock *HoistPt, in makeGepOperandsAvailable() argument
1038 if (auto *Ld = dyn_cast<LoadInst>(Repl)) { in makeGepOperandsAvailable()
1040 } else if (auto *St = dyn_cast<StoreInst>(Repl)) { in makeGepOperandsAvailable()
1058 makeGepsAvailable(Repl, HoistPt, InstructionsToHoist, Gep); in makeGepOperandsAvailable()
1061 makeGepsAvailable(Repl, HoistPt, InstructionsToHoist, Val); in makeGepOperandsAvailable()
1073 Instruction *Repl = nullptr; in hoist() local
1079 if (!Repl || firstInBB(I, Repl)) in hoist()
1080 Repl = I; in hoist()
1085 if (Repl) { in hoist()
1087 assert(allOperandsAvailable(Repl, DestBB) && in hoist()
1093 Repl = InstructionsToHoist.front(); in hoist()
1098 if (!allOperandsAvailable(Repl, DestBB)) { in hoist()
1105 if (!makeGepOperandsAvailable(Repl, DestBB, InstructionsToHoist)) in hoist()
1111 MD->removeInstruction(Repl); in hoist()
1112 Repl->moveBefore(Last); in hoist()
1114 DFSNumber[Repl] = DFSNumber[Last]++; in hoist()
1118 Repl->dropLocation(); in hoist()
1119 NR += removeAndReplace(InstructionsToHoist, Repl, DestBB, MoveAccess); in hoist()
1121 if (isa<LoadInst>(Repl)) in hoist()
1123 else if (isa<StoreInst>(Repl)) in hoist()
1125 else if (isa<CallInst>(Repl)) in hoist()