Lines Matching defs:OldTI
627 const Instruction *OldTI = BB->getTerminator();
629 if (const BranchInst *BI = dyn_cast<BranchInst>(OldTI)) {
642 VMap[OldTI] = BranchInst::Create(Dest, NewBB);
647 } else if (const SwitchInst *SI = dyn_cast<SwitchInst>(OldTI)) {
657 VMap[OldTI] = BranchInst::Create(Dest, NewBB);
664 Instruction *NewInst = OldTI->clone();
665 if (OldTI->hasName())
666 NewInst->setName(OldTI->getName() + NameSuffix);
669 CloneDbgRecordsToHere(NewInst, OldTI->getIterator());
671 VMap[OldTI] = NewInst; // Add instruction map to value.
674 CodeInfo->OrigVMap[OldTI] = NewInst;
675 if (auto *CB = dyn_cast<CallBase>(OldTI))
688 CloneDbgRecordsToHere(NewInst, OldTI->getIterator());