Lines Matching defs:NewInst
61 Instruction *NewInst = I.clone();
63 NewInst->setName(I.getName() + NameSuffix);
65 NewInst->insertBefore(*NewBB, NewBB->end());
66 NewInst->cloneDebugInfoFrom(&I);
68 VMap[&I] = NewInst; // Add instruction map to value.
392 Instruction *NewInst = nullptr;
452 NewInst = CallInst::Create(IFn, Args, OldInst.getName() + ".strict");
455 if (!NewInst)
456 NewInst = II->clone();
457 return NewInst;
498 [NewBB, &DbgCursor](Instruction *NewInst, BasicBlock::const_iterator II) {
506 NewInst->cloneDebugInfoFrom(&*DbgCursor, std::nullopt, false);
507 NewInst->cloneDebugInfoFrom(&*II);
516 Instruction *NewInst = cloneInstruction(II);
517 NewInst->insertInto(NewBB, NewBB->end());
522 if (auto *Call = dyn_cast<CallInst>(NewInst))
529 if (!isa<PHINode>(NewInst) && !isa<DbgVariableIntrinsic>(NewInst)) {
530 RemapInstruction(NewInst, VMap,
538 NewInst, BB->getDataLayout())) {
539 if (isInstructionTriviallyDead(NewInst)) {
541 NewInst->eraseFromParent();
548 NewInst->setName(II->getName() + NameSuffix);
549 VMap[&*II] = NewInst; // Add instruction map to value.
555 CloneDbgRecordsToHere(NewInst, II);
558 CodeInfo->OrigVMap[&*II] = NewInst;
561 CodeInfo->OperandBundleCallSites.push_back(NewInst);
610 Instruction *NewInst = OldTI->clone();
612 NewInst->setName(OldTI->getName() + NameSuffix);
613 NewInst->insertInto(NewBB, NewBB->end());
615 CloneDbgRecordsToHere(NewInst, OldTI->getIterator());
617 VMap[OldTI] = NewInst; // Add instruction map to value.
620 CodeInfo->OrigVMap[OldTI] = NewInst;
623 CodeInfo->OperandBundleCallSites.push_back(NewInst);
631 Instruction *NewInst = NewBB->getTerminator();
632 assert(NewInst);
634 CloneDbgRecordsToHere(NewInst, OldTI->getIterator());