Lines Matching refs:OldFunc
92 void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, in CloneFunctionInto() argument
99 NewFunc->setIsNewDbgInfoFormat(OldFunc->IsNewDbgInfoFormat); in CloneFunctionInto()
103 for (const Argument &I : OldFunc->args()) in CloneFunctionInto()
112 NewFunc->copyAttributesFrom(OldFunc); in CloneFunctionInto()
119 if (OldFunc->hasPersonalityFn()) in CloneFunctionInto()
120 NewFunc->setPersonalityFn(MapValue(OldFunc->getPersonalityFn(), VMap, in CloneFunctionInto()
124 if (OldFunc->hasPrefixData()) { in CloneFunctionInto()
125 NewFunc->setPrefixData(MapValue(OldFunc->getPrefixData(), VMap, in CloneFunctionInto()
130 if (OldFunc->hasPrologueData()) { in CloneFunctionInto()
131 NewFunc->setPrologueData(MapValue(OldFunc->getPrologueData(), VMap, in CloneFunctionInto()
137 AttributeList OldAttrs = OldFunc->getAttributes(); in CloneFunctionInto()
140 for (const Argument &OldArg : OldFunc->args()) { in CloneFunctionInto()
153 if (OldFunc->isDeclaration()) in CloneFunctionInto()
168 NewFunc->getParent() == OldFunc->getParent()) && in CloneFunctionInto()
174 SPClonedWithinModule = OldFunc->getSubprogram(); in CloneFunctionInto()
179 NewFunc->getParent() != OldFunc->getParent()) && in CloneFunctionInto()
194 for (const BasicBlock &BB : *OldFunc) { in CloneFunctionInto()
210 Constant *OldBBAddr = BlockAddress::get(const_cast<Function *>(OldFunc), in CloneFunctionInto()
265 OldFunc->getAllMetadata(MDs); in CloneFunctionInto()
274 BB = cast<BasicBlock>(VMap[&OldFunc->front()])->getIterator(), in CloneFunctionInto()
362 const Function *OldFunc; member
375 : NewFunc(newFunc), OldFunc(oldFunc), VMap(valueMap), in PruningFunctionCloner()
487 Constant *OldBBAddr = BlockAddress::get(const_cast<Function *>(OldFunc), in CloneBlock()
649 void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc, in CloneAndPruneIntoFromInst() argument
665 for (const Argument &II : OldFunc->args()) in CloneAndPruneIntoFromInst()
669 PruningFunctionCloner PFC(NewFunc, OldFunc, VMap, ModuleLevelChanges, in CloneAndPruneIntoFromInst()
675 StartingBB = &OldFunc->getEntryBlock(); in CloneAndPruneIntoFromInst()
681 for (const auto &BB : *OldFunc) { in CloneAndPruneIntoFromInst()
703 for (const BasicBlock &BI : *OldFunc) { in CloneAndPruneIntoFromInst()
815 AttributeFuncs::typeIncompatible(OldFunc->getReturnType()); in CloneAndPruneIntoFromInst()
822 for (const auto &BB : *OldFunc) { in CloneAndPruneIntoFromInst()
952 Function *NewFunc, const Function *OldFunc, ValueToValueMapTy &VMap, in CloneAndPruneFunctionInto() argument
955 CloneAndPruneIntoFromInst(NewFunc, OldFunc, &OldFunc->front().front(), VMap, in CloneAndPruneFunctionInto()