Home
last modified time | relevance | path

Searched refs:NewF (Results 1 – 25 of 31) sorted by relevance

12

/freebsd/contrib/llvm-project/llvm/lib/Transforms/Coroutines/
H A DCoroCloner.h53 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 DCoroSplit.cpp423 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 DWebAssemblyAddMissingPrototypes.cpp134 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 DWebAssemblyLowerEmscriptenEHSjLj.cpp354 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 DR600OpenCLImageTypeLoweringPass.cpp291 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 DAMDGPULowerBufferFatPointers.cpp2370 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 DSPIRVRegularizer.cpp192 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 DSPIRVPrepareFunctions.cpp82 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 DMergeFunctions.cpp893 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 DThinLTOBitcodeWriter.cpp192 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 DArgumentPromotion.cpp915 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 DMemProfContextDisambiguation.cpp4932 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 DIndirectionUtils.cpp341 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 DMiscompilation.cpp402 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 DAMDGPU.cpp332 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 DLoopStrengthReduce.cpp4606 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 DFloat2Int.cpp232 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 DDXILValueEnumerator.h83 bool hasDifferentFunction(unsigned NewF) const { return F && F != NewF; } in hasDifferentFunction()
/freebsd/contrib/llvm-project/llvm/lib/Bitcode/Writer/
H A DValueEnumerator.h80 bool hasDifferentFunction(unsigned NewF) const { return F && F != NewF; } in hasDifferentFunction()
/freebsd/contrib/llvm-project/llvm/lib/Target/BPF/
H A DBPFISelLowering.cpp742 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 DLazyCallGraph.cpp135 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 DDataFlowSanitizer.cpp1304 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 DCloneFunction.cpp390 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 DIRMover.cpp667 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 DLazyCallGraph.h393 void replaceFunction(Function &NewF);
867 LLVM_ABI void replaceNodeFunction(Node &N, Function &NewF);

12