Lines Matching refs:Repl
849 void makeGepsAvailable(Instruction *Repl, BasicBlock *HoistPt, in makeGepsAvailable() argument
888 Repl->replaceUsesOfWith(Gep, ClonedGep); in makeGepsAvailable()
891 void updateAlignment(Instruction *I, Instruction *Repl) { in updateAlignment() argument
892 if (auto *ReplacementLoad = dyn_cast<LoadInst>(Repl)) { in updateAlignment()
897 } else if (auto *ReplacementStore = dyn_cast<StoreInst>(Repl)) { in updateAlignment()
902 } else if (auto *ReplacementAlloca = dyn_cast<AllocaInst>(Repl)) { in updateAlignment()
906 } else if (isa<CallInst>(Repl)) { in updateAlignment()
913 unsigned rauw(const SmallVecInsn &Candidates, Instruction *Repl, in rauw() argument
917 if (I != Repl) { in rauw()
919 updateAlignment(I, Repl); in rauw()
927 Repl->andIRFlags(I); in rauw()
928 combineKnownMetadata(Repl, I); in rauw()
929 I->replaceAllUsesWith(Repl); in rauw()
955 unsigned removeAndReplace(const SmallVecInsn &Candidates, Instruction *Repl, in removeAndReplace() argument
957 MemoryUseOrDef *NewMemAcc = MSSA->getMemoryAccess(Repl); in removeAndReplace()
965 unsigned NR = rauw(Candidates, Repl, NewMemAcc); in removeAndReplace()
976 bool makeGepOperandsAvailable(Instruction *Repl, BasicBlock *HoistPt, in makeGepOperandsAvailable() argument
981 if (auto *Ld = dyn_cast<LoadInst>(Repl)) { in makeGepOperandsAvailable()
983 } else if (auto *St = dyn_cast<StoreInst>(Repl)) { in makeGepOperandsAvailable()
1001 makeGepsAvailable(Repl, HoistPt, InstructionsToHoist, Gep); in makeGepOperandsAvailable()
1004 makeGepsAvailable(Repl, HoistPt, InstructionsToHoist, Val); in makeGepOperandsAvailable()
1016 Instruction *Repl = nullptr; in hoist() local
1022 if (!Repl || firstInBB(I, Repl)) in hoist()
1023 Repl = I; in hoist()
1028 if (Repl) { in hoist()
1030 assert(allOperandsAvailable(Repl, DestBB) && in hoist()
1036 Repl = InstructionsToHoist.front(); in hoist()
1041 if (!allOperandsAvailable(Repl, DestBB)) { in hoist()
1048 if (!makeGepOperandsAvailable(Repl, DestBB, InstructionsToHoist)) in hoist()
1054 MD->removeInstruction(Repl); in hoist()
1055 Repl->moveBefore(Last); in hoist()
1057 DFSNumber[Repl] = DFSNumber[Last]++; in hoist()
1060 NR += removeAndReplace(InstructionsToHoist, Repl, DestBB, MoveAccess); in hoist()
1062 if (isa<LoadInst>(Repl)) in hoist()
1064 else if (isa<StoreInst>(Repl)) in hoist()
1066 else if (isa<CallInst>(Repl)) in hoist()