Lines Matching refs:NewF
59 static void replaceFunctionCalls(Function *OldF, Function *NewF) { in replaceFunctionCalls() argument
69 SmallVector<Value *> Args(NewF->arg_size(), nullptr); in replaceFunctionCalls()
72 for (auto ArgIdx : llvm::seq<size_t>(OldF->arg_size(), NewF->arg_size())) { in replaceFunctionCalls()
73 Type *NewArgTy = NewF->getArg(ArgIdx)->getType(); in replaceFunctionCalls()
89 NewCI = InvokeInst::Create(NewF, cast<InvokeInst>(II)->getNormalDest(), in replaceFunctionCalls()
94 NewCI = CallInst::Create(NewF, Args, OperandBundles, CI->getName()); in replaceFunctionCalls()
96 NewCI->setCallingConv(NewF->getCallingConv()); in replaceFunctionCalls()
127 Function *NewF = in substituteOperandWithArgument() local
132 NewF->removeFromParent(); in substituteOperandWithArgument()
133 OldF->getParent()->getFunctionList().insertAfter(OldF->getIterator(), NewF); in substituteOperandWithArgument()
137 for (auto Z : zip_first(OldF->args(), NewF->args())) { in substituteOperandWithArgument()
147 for (auto Z : zip_first(UniqueValues, drop_begin(NewF->args(), ArgOffset))) { in substituteOperandWithArgument()
156 CloneFunctionInto(NewF, OldF, VMap, CloneFunctionChangeType::LocalChangesOnly, in substituteOperandWithArgument()
167 replaceFunctionCalls(OldF, NewF); in substituteOperandWithArgument()
171 OldF->replaceAllUsesWith(ConstantExpr::getBitCast(NewF, OldF->getType())); in substituteOperandWithArgument()
173 NewF->setName(FName); in substituteOperandWithArgument()