| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Coroutines/ |
| H A D | CoroCloner.h | 53 Function *NewF = nullptr; variable 62 Function *NewF, AnyCoroSuspendInst *ActiveSuspend, in BaseCloner() argument 67 Builder(OrigF.getContext()), TTI(TTI), NewF(NewF), in BaseCloner() 71 assert(NewF && "need existing function for continuation"); in BaseCloner() 85 coro::Shape &Shape, Function *NewF, in createClone() argument 92 BaseCloner Cloner(OrigF, Suffix, Shape, NewF, ActiveSuspend, TTI); in createClone() 98 assert(NewF != nullptr && "declaration not yet set"); in getFunction() 99 return NewF; in getFunction()
|
| H A D | CoroSplit.cpp | 423 if (NewF->isCoroOnlyDestroyWhenComplete()) { in handleFinalSuspend() 458 Function *NewF = in createCloneDeclaration() local 462 M->getFunctionList().insert(InsertBefore, NewF); in createCloneDeclaration() 464 return NewF; in createCloneDeclaration() 484 for (auto I = IsAsyncABI ? NewF->arg_begin() : std::next(NewF->arg_begin()), in replaceRetconOrAsyncSuspendUses() 485 E = NewF->arg_end(); in replaceRetconOrAsyncSuspendUses() 637 ::replaceSwiftErrorOps(*NewF, Shape, &VMap); in replaceSwiftErrorOps() 641 auto [Worklist, DbgVariableRecords] = collectDbgVariableIntrinsics(*NewF); in salvageDebugInfo() 653 DominatorTree DomTree(*NewF); in salvageDebugInfo() 655 return !isPotentiallyReachable(&NewF->getEntryBlock(), BB, nullptr, in salvageDebugInfo() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
| H A D | WebAssemblyAddMissingPrototypes.cpp | 134 Function *NewF = in runOnModule() local 136 NewF->setAttributes(F.getAttributes()); in runOnModule() 137 NewF->removeFnAttr("no-prototype"); in runOnModule() 138 Replacements.emplace_back(&F, NewF); in runOnModule() 143 Function *NewF = Pair.second; in runOnModule() local 145 M.getFunctionList().push_back(NewF); in runOnModule() 147 ConstantExpr::getPointerBitCastOrAddrSpaceCast(NewF, OldF->getType())); in runOnModule() 149 NewF->setName(Name); in runOnModule()
|
| H A D | WebAssemblyLowerEmscriptenEHSjLj.cpp | 354 void replaceLongjmpWith(Function *LongjmpF, Function *NewF); 815 Function *NewF) { in replaceLongjmpWith() argument 816 assert(NewF == EmLongjmpF || NewF == WasmLongjmpF); in replaceLongjmpWith() 829 if (NewF == EmLongjmpF) in replaceLongjmpWith() 834 IRB.CreateCall(NewF, {Env, CI->getArgOperand(1)}); in replaceLongjmpWith() 845 IRB.CreateBitCast(NewF, LongjmpF->getType(), "longjmp.cast"); in replaceLongjmpWith()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | R600OpenCLImageTypeLoweringPass.cpp | 291 auto *NewF = Function::Create(NewFT, F->getLinkage(), F->getName()); in addImplicitArgs() local 293 auto *NewFArgIt = NewF->arg_begin(); in addImplicitArgs() 304 CloneFunctionInto(NewF, F, VMap, CloneFunctionChangeType::LocalChangesOnly, in addImplicitArgs() 309 KernelMDArgs.push_back(ConstantAsMetadata::get(NewF)); in addImplicitArgs() 314 return std::tuple(NewF, NewMDNode); in addImplicitArgs() 329 Function *NewF; in transformKernels() local 331 std::tie(NewF, NewMDNode) = addImplicitArgs(F, KernelMDNode); in transformKernels() 332 if (NewF) { in transformKernels() 335 M.getFunctionList().push_back(NewF); in transformKernels() 336 M.getOrInsertFunction(NewF->getName(), NewF->getFunctionType(), in transformKernels() [all …]
|
| H A D | AMDGPULowerBufferFatPointers.cpp | 2370 Function *NewF = in moveFunctionAdaptingType() local 2372 NewF->copyAttributesFrom(OldF); in moveFunctionAdaptingType() 2373 NewF->copyMetadata(OldF, 0); in moveFunctionAdaptingType() 2374 NewF->takeName(OldF); in moveFunctionAdaptingType() 2375 NewF->updateAfterNameChange(); in moveFunctionAdaptingType() 2376 NewF->setDLLStorageClass(OldF->getDLLStorageClass()); in moveFunctionAdaptingType() 2377 OldF->getParent()->getFunctionList().insertAfter(OldF->getIterator(), NewF); in moveFunctionAdaptingType() 2382 BB->insertInto(NewF); in moveFunctionAdaptingType() 2392 for (auto [I, OldArg, NewArg] : enumerate(OldF->args(), NewF->args())) { in moveFunctionAdaptingType() 2405 NewF->getContext(), in moveFunctionAdaptingType() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/ |
| H A D | SPIRVRegularizer.cpp | 192 Function *NewF = nullptr; in visitCallScalToVec() local 199 NewF = Function::Create(NewFTy, OldF->getLinkage(), OldF->getName(), in visitCallScalToVec() 202 auto NewFArgIt = NewF->arg_begin(); in visitCallScalToVec() 209 CloneFunctionInto(NewF, OldF, VMap, in visitCallScalToVec() 211 NewF->setAttributes(Attrs); in visitCallScalToVec() 212 It->second = NewF; in visitCallScalToVec() 214 NewF = It->second; in visitCallScalToVec() 216 assert(NewF); in visitCallScalToVec() 239 CI->replaceUsesOfWith(OldF, NewF); in visitCallScalToVec() 240 CI->mutateFunctionType(NewF->getFunctionType()); in visitCallScalToVec() [all …]
|
| H A D | SPIRVPrepareFunctions.cpp | 82 Function *NewF = Function::Create(FT, GlobalValue::ExternalLinkage, Name, M); in getOrCreateFunction() local 84 NewF->setDSOLocal(F->isDSOLocal()); in getOrCreateFunction() 85 NewF->setCallingConv(CallingConv::SPIR_FUNC); in getOrCreateFunction() 86 return NewF; in getOrCreateFunction() 462 Function *NewF = in removeAggregateTypesFromSignature() local 466 auto NewFArgIt = NewF->arg_begin(); in removeAggregateTypesFromSignature() 474 CloneFunctionInto(NewF, F, VMap, CloneFunctionChangeType::LocalChangesOnly, in removeAggregateTypesFromSignature() 476 NewF->takeName(F); in removeAggregateTypesFromSignature() 481 MDArgs.push_back(MDString::get(B.getContext(), NewF->getName())); in removeAggregateTypesFromSignature() 492 CI->mutateFunctionType(NewF->getFunctionType()); in removeAggregateTypesFromSignature() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/ |
| H A D | MergeFunctions.cpp | 893 Function *NewF = Function::Create(F->getFunctionType(), F->getLinkage(), in mergeTwoFunctions() local 895 NewF->copyAttributesFrom(F); in mergeTwoFunctions() 896 NewF->takeName(F); in mergeTwoFunctions() 897 NewF->setComdat(F->getComdat()); in mergeTwoFunctions() 900 copyMetadataIfPresent(F, NewF, "type"); in mergeTwoFunctions() 901 copyMetadataIfPresent(F, NewF, "kcfi_type"); in mergeTwoFunctions() 903 F->replaceAllUsesWith(NewF); in mergeTwoFunctions() 910 replaceDirectCallers(NewF, F); in mergeTwoFunctions() 914 const MaybeAlign NewFAlign = NewF->getAlign(); in mergeTwoFunctions() 918 writeThunkOrAliasIfNeeded(F, NewF); in mergeTwoFunctions()
|
| H A D | ThinLTOBitcodeWriter.cpp | 192 Function *NewF = in simplifyExternals() local 195 NewF->copyAttributesFrom(&F); in simplifyExternals() 197 NewF->setAttributes(AttributeList::get(M.getContext(), in simplifyExternals() 200 NewF->takeName(&F); in simplifyExternals() 201 F.replaceAllUsesWith(NewF); in simplifyExternals()
|
| H A D | ArgumentPromotion.cpp | 915 Function *NewF = promoteArguments(&OldF, FAM, MaxElements, IsRecursive); in run() local 916 if (!NewF) in run() 925 C.getOuterRefSCC().replaceNodeFunction(N, *NewF); in run() 931 for (auto *U : NewF->users()) { in run()
|
| H A D | MemProfContextDisambiguation.cpp | 4932 auto *NewF = CloneFunction(&F, *VMaps.back()); in createFunctionClones() local 4936 for (auto &BB : *NewF) { in createFunctionClones() 4948 NewF->takeName(PrevF); in createFunctionClones() 4949 PrevF->replaceAllUsesWith(NewF); in createFunctionClones() 4952 NewF->setName(Name); in createFunctionClones() 4953 if (auto *SP = NewF->getSubprogram()) in createFunctionClones() 4955 MDString::get(NewF->getParent()->getContext(), Name)); in createFunctionClones() 4957 << "created clone " << ore::NV("NewFunction", NewF)); in createFunctionClones() 4967 A->getLinkage(), Name, NewF); in createFunctionClones() 5188 auto NewF = M.getOrInsertFunction( in applyImport() local [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/ |
| H A D | IndirectionUtils.cpp | 341 Function *NewF = in cloneFunctionDecl() local 344 NewF->copyAttributesFrom(&F); in cloneFunctionDecl() 347 (*VMap)[&F] = NewF; in cloneFunctionDecl() 348 auto NewArgI = NewF->arg_begin(); in cloneFunctionDecl() 354 return NewF; in cloneFunctionDecl()
|
| /freebsd/contrib/llvm-project/llvm/tools/bugpoint/ |
| H A D | Miscompilation.cpp | 402 Function *NewF = ToNotOptimize->getFunction(MisCompFunctions[i].first); in ExtractLoops() local 404 assert(NewF && "Function not found??"); in ExtractLoops() 405 MiscompiledFunctions.push_back(NewF); in ExtractLoops() 434 Function *NewF = ToNotOptimize->getFunction(MisCompFunctions[i].first); in ExtractLoops() local 436 assert(NewF && "Function not found??"); in ExtractLoops() 437 MiscompiledFunctions.push_back(NewF); in ExtractLoops() 601 Function *NewF = ProgClone->getFunction(MisCompFunctions[i].first); in ExtractBlocks() local 602 assert(NewF && "Function not found??"); in ExtractBlocks() 603 MiscompiledFunctions.push_back(NewF); in ExtractBlocks()
|
| /freebsd/contrib/llvm-project/clang/lib/Basic/Targets/ |
| H A D | AMDGPU.cpp | 332 std::string NewF = F.str(); in getTargetDefines() local 333 llvm::replace(NewF, '-', '_'); in getTargetDefines() 334 Builder.defineMacro(Twine("__amdgcn_feature_") + Twine(NewF) + in getTargetDefines()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | LoopStrengthReduce.cpp | 4606 Formula NewF = F; in GenerateCrossUseConstantOffsets() local 4607 NewF.BaseOffset = Offset; in GenerateCrossUseConstantOffsets() 4609 NewF)) in GenerateCrossUseConstantOffsets() 4611 NewF.ScaledReg = SE.getAddExpr(NegImmS, NewF.ScaledReg); in GenerateCrossUseConstantOffsets() 4616 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(NewF.ScaledReg)) { in GenerateCrossUseConstantOffsets() 4620 if (NewF.BaseOffset.isNonZero() && NewF.BaseOffset.isScalable()) in GenerateCrossUseConstantOffsets() 4623 (NewF.BaseOffset.isLessThanZero()) && in GenerateCrossUseConstantOffsets() 4625 .ule(std::abs(NewF.BaseOffset.getFixedValue()))) in GenerateCrossUseConstantOffsets() 4630 NewF.canonicalize(*this->L); in GenerateCrossUseConstantOffsets() 4631 (void)InsertFormula(LU, LUIdx, NewF); in GenerateCrossUseConstantOffsets() [all …]
|
| H A D | Float2Int.cpp | 232 APFloat NewF = F; in calcRange() local 233 auto Res = NewF.roundToIntegral(APFloat::rmNearestTiesToEven); in calcRange() 234 if (Res != APFloat::opOK || NewF != F) in calcRange()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/DirectX/DXILWriter/ |
| H A D | DXILValueEnumerator.h | 83 bool hasDifferentFunction(unsigned NewF) const { return F && F != NewF; } in hasDifferentFunction()
|
| /freebsd/contrib/llvm-project/llvm/lib/Bitcode/Writer/ |
| H A D | ValueEnumerator.h | 80 bool hasDifferentFunction(unsigned NewF) const { return F && F != NewF; } in hasDifferentFunction()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/BPF/ |
| H A D | BPFISelLowering.cpp | 742 Function *NewF = in createBPFUnreachable() local 744 NewF->setDSOLocal(true); in createBPFUnreachable() 745 NewF->setCallingConv(CallingConv::C); in createBPFUnreachable() 746 NewF->setSection(".ksyms"); in createBPFUnreachable() 749 return NewF; in createBPFUnreachable() 759 NewF->setSubprogram(SP); in createBPFUnreachable() 760 return NewF; in createBPFUnreachable()
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | LazyCallGraph.cpp | 135 void LazyCallGraph::Node::replaceFunction(Function &NewF) { in replaceFunction() argument 136 assert(F != &NewF && "Must not replace a function with itself!"); in replaceFunction() 137 F = &NewF; in replaceFunction() 1448 void LazyCallGraph::RefSCC::replaceNodeFunction(Node &N, Function &NewF) { in replaceNodeFunction() argument 1457 assert(G->NodeMap.find(&NewF) == G->NodeMap.end() && in replaceNodeFunction() 1466 assert(&OldF != &NewF && "Cannot replace a function with itself!"); in replaceNodeFunction() 1471 N.replaceFunction(NewF); in replaceNodeFunction() 1475 G->NodeMap[&NewF] = &N; in replaceNodeFunction() 1480 G->LibFunctions.insert(&NewF); in replaceNodeFunction()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
| H A D | DataFlowSanitizer.cpp | 1304 Function *NewF = Function::Create(NewFT, NewFLink, F->getAddressSpace(), in buildWrapperFunction() local 1306 NewF->copyAttributesFrom(F); in buildWrapperFunction() 1307 NewF->removeRetAttrs(AttributeFuncs::typeIncompatible( in buildWrapperFunction() 1308 NewFT->getReturnType(), NewF->getAttributes().getRetAttrs())); in buildWrapperFunction() 1310 BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", NewF); in buildWrapperFunction() 1312 NewF->removeFnAttr("split-stack"); in buildWrapperFunction() 1317 auto ArgIt = pointer_iterator<Argument *>(NewF->arg_begin()); in buildWrapperFunction() 1327 return NewF; in buildWrapperFunction() 1576 Function *NewF = in runImpl() local 1578 GA.replaceAllUsesWith(NewF); in runImpl() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | CloneFunction.cpp | 390 Function *NewF = Function::Create(FTy, F->getLinkage(), F->getAddressSpace(), in CloneFunction() local 394 Function::arg_iterator DestI = NewF->arg_begin(); in CloneFunction() 402 CloneFunctionInto(NewF, F, VMap, CloneFunctionChangeType::LocalChangesOnly, in CloneFunction() 405 return NewF; in CloneFunction()
|
| /freebsd/contrib/llvm-project/llvm/lib/Linker/ |
| H A D | IRMover.cpp | 667 if (auto *NewF = dyn_cast<Function>(NewGV)) { in copyGlobalValueProto() local 668 NewF->setPersonalityFn(nullptr); in copyGlobalValueProto() 669 NewF->setPrefixData(nullptr); in copyGlobalValueProto() 670 NewF->setPrologueData(nullptr); in copyGlobalValueProto()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
| H A D | LazyCallGraph.h | 393 void replaceFunction(Function &NewF); 867 LLVM_ABI void replaceNodeFunction(Node &N, Function &NewF);
|