Home
last modified time | relevance | path

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

12

/external/llvm/lib/ExecutionEngine/Orc/
DIndirectionUtils.cpp167 Function *NewF = in cloneFunctionDecl() local
170 NewF->copyAttributesFrom(&F); in cloneFunctionDecl()
173 (*VMap)[&F] = NewF; in cloneFunctionDecl()
174 auto NewArgI = NewF->arg_begin(); in cloneFunctionDecl()
180 return NewF; in cloneFunctionDecl()
185 Function *NewF) { in moveFunctionBody() argument
187 if (!NewF) in moveFunctionBody()
188 NewF = cast<Function>(VMap[&OrigF]); in moveFunctionBody()
190 assert(VMap[&OrigF] == NewF && "Incorrect function mapping in VMap."); in moveFunctionBody()
191 assert(NewF && "Function mapping missing from VMap."); in moveFunctionBody()
[all …]
/external/llvm/lib/Target/AMDGPU/
DAMDGPUOpenCLImageTypeLoweringPass.cpp290 auto NewF = Function::Create(NewFT, F->getLinkage(), F->getName()); in addImplicitArgs() local
292 auto NewFArgIt = NewF->arg_begin(); in addImplicitArgs()
303 CloneFunctionInto(NewF, F, VMap, /*ModuleLevelChanges=*/false, Returns); in addImplicitArgs()
307 KernelMDArgs.push_back(ConstantAsMetadata::get(NewF)); in addImplicitArgs()
312 return std::make_tuple(NewF, NewMDNode); in addImplicitArgs()
327 Function *NewF; in transformKernels() local
329 std::tie(NewF, NewMDNode) = addImplicitArgs(F, KernelMDNode); in transformKernels()
330 if (NewF) { in transformKernels()
333 M.getFunctionList().push_back(NewF); in transformKernels()
334 M.getOrInsertFunction(NewF->getName(), NewF->getFunctionType(), in transformKernels()
[all …]
DSITypeRewriter.cpp133 Function *NewF = Mod->getFunction(Name); in visitCallInst() local
134 if (!NewF) { in visitCallInst()
135NewF = Function::Create(FunctionType::get(F->getReturnType(), Types, false), GlobalValue::External… in visitCallInst()
136 NewF->setAttributes(F->getAttributes()); in visitCallInst()
138 I.replaceAllUsesWith(Builder.CreateCall(NewF, Args)); in visitCallInst()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AMDGPU/
DR600OpenCLImageTypeLoweringPass.cpp307 auto NewF = Function::Create(NewFT, F->getLinkage(), F->getName()); in addImplicitArgs() local
309 auto NewFArgIt = NewF->arg_begin(); in addImplicitArgs()
320 CloneFunctionInto(NewF, F, VMap, /*ModuleLevelChanges=*/false, Returns); in addImplicitArgs()
324 KernelMDArgs.push_back(ConstantAsMetadata::get(NewF)); in addImplicitArgs()
329 return std::make_tuple(NewF, NewMDNode); in addImplicitArgs()
344 Function *NewF; in transformKernels() local
346 std::tie(NewF, NewMDNode) = addImplicitArgs(F, KernelMDNode); in transformKernels()
347 if (NewF) { in transformKernels()
350 M.getFunctionList().push_back(NewF); in transformKernels()
351 M.getOrInsertFunction(NewF->getName(), NewF->getFunctionType(), in transformKernels()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/WebAssembly/
DWebAssemblyAddMissingPrototypes.cpp90 Function* NewF = nullptr; in runOnModule() local
99 NewF = Function::Create(NewType, F.getLinkage(), F.getName()); in runOnModule()
100 NewF->setAttributes(F.getAttributes()); in runOnModule()
101 NewF->removeFnAttr("no-prototype"); in runOnModule()
122 BC->replaceAllUsesWith(NewF); in runOnModule()
123 Replacements.emplace_back(&F, NewF); in runOnModule()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/ExecutionEngine/Orc/
DIndirectionUtils.cpp268 Function *NewF = in cloneFunctionDecl() local
271 NewF->copyAttributesFrom(&F); in cloneFunctionDecl()
274 (*VMap)[&F] = NewF; in cloneFunctionDecl()
275 auto NewArgI = NewF->arg_begin(); in cloneFunctionDecl()
281 return NewF; in cloneFunctionDecl()
286 Function *NewF) { in moveFunctionBody() argument
288 if (!NewF) in moveFunctionBody()
289 NewF = cast<Function>(VMap[&OrigF]); in moveFunctionBody()
291 assert(VMap[&OrigF] == NewF && "Incorrect function mapping in VMap."); in moveFunctionBody()
292 assert(NewF && "Function mapping missing from VMap."); in moveFunctionBody()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Coroutines/
DCoroSplit.cpp252 Function *NewF = in createClone() local
255 NewF->addParamAttr(0, Attribute::NonNull); in createClone()
256 NewF->addParamAttr(0, Attribute::NoAlias); in createClone()
267 CloneFunctionInto(NewF, &F, VMap, /*ModuleLevelChanges=*/true, Returns); in createClone()
268 NewF->setLinkage(GlobalValue::LinkageTypes::InternalLinkage); in createClone()
275 NewF->removeAttributes( in createClone()
277 AttributeFuncs::typeIncompatible(NewF->getReturnType())); in createClone()
282 Entry->moveBefore(&NewF->getEntryBlock()); in createClone()
291 IRBuilder<> Builder(&NewF->getEntryBlock().front()); in createClone()
294 Argument *NewFramePtr = &*NewF->arg_begin(); in createClone()
[all …]
/external/llvm/lib/Transforms/Instrumentation/
DDataFlowSanitizer.cpp538 Function *NewF = Function::Create(NewFT, NewFLink, NewFName, in buildWrapperFunction() local
540 NewF->copyAttributesFrom(F); in buildWrapperFunction()
541 NewF->removeAttributes( in buildWrapperFunction()
546 BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", NewF); in buildWrapperFunction()
548 NewF->removeAttributes( in buildWrapperFunction()
559 for (Function::arg_iterator ai = NewF->arg_begin(); n != 0; ++ai, --n) in buildWrapperFunction()
568 return NewF; in buildWrapperFunction()
687 Function *NewF = in runOnModule() local
689 GA->replaceAllUsesWith(ConstantExpr::getBitCast(NewF, GA->getType())); in runOnModule()
690 NewF->takeName(GA); in runOnModule()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Instrumentation/
DDataFlowSanitizer.cpp648 Function *NewF = Function::Create(NewFT, NewFLink, NewFName, in buildWrapperFunction() local
650 NewF->copyAttributesFrom(F); in buildWrapperFunction()
651 NewF->removeAttributes( in buildWrapperFunction()
655 BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", NewF); in buildWrapperFunction()
657 NewF->removeAttributes(AttributeList::FunctionIndex, in buildWrapperFunction()
666 for (Function::arg_iterator ai = NewF->arg_begin(); n != 0; ++ai, --n) in buildWrapperFunction()
675 return NewF; in buildWrapperFunction()
793 Function *NewF = in runOnModule() local
795 GA->replaceAllUsesWith(ConstantExpr::getBitCast(NewF, GA->getType())); in runOnModule()
796 NewF->takeName(GA); in runOnModule()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/tools/bugpoint/
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()
433 Function *NewF = ToNotOptimize->getFunction(MisCompFunctions[i].first); in ExtractLoops() local
435 assert(NewF && "Function not found??"); in ExtractLoops()
436 MiscompiledFunctions.push_back(NewF); in ExtractLoops()
602 Function *NewF = ProgClone->getFunction(MisCompFunctions[i].first); in ExtractBlocks() local
603 assert(NewF && "Function not found??"); in ExtractBlocks()
604 MiscompiledFunctions.push_back(NewF); in ExtractBlocks()
/external/llvm/tools/bugpoint/
DMiscompilation.cpp397 Function *NewF = ToNotOptimize->getFunction(MisCompFunctions[i].first); in ExtractLoops() local
399 assert(NewF && "Function not found??"); in ExtractLoops()
400 MiscompiledFunctions.push_back(NewF); in ExtractLoops()
427 Function *NewF = ToNotOptimize->getFunction(MisCompFunctions[i].first); in ExtractLoops() local
429 assert(NewF && "Function not found??"); in ExtractLoops()
430 MiscompiledFunctions.push_back(NewF); in ExtractLoops()
597 Function *NewF = ProgClone->getFunction(MisCompFunctions[i].first); in ExtractBlocks() local
598 assert(NewF && "Function not found??"); in ExtractBlocks()
599 MiscompiledFunctions.push_back(NewF); in ExtractBlocks()
/external/llvm/lib/Transforms/Scalar/
DLoopStrengthReduce.cpp3746 Formula NewF = F; in GenerateCrossUseConstantOffsets() local
3747 NewF.BaseOffset = Offset; in GenerateCrossUseConstantOffsets()
3749 NewF)) in GenerateCrossUseConstantOffsets()
3751 NewF.ScaledReg = SE.getAddExpr(NegImmS, NewF.ScaledReg); in GenerateCrossUseConstantOffsets()
3756 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(NewF.ScaledReg)) in GenerateCrossUseConstantOffsets()
3757 if (C->getValue()->isNegative() != (NewF.BaseOffset < 0) && in GenerateCrossUseConstantOffsets()
3759 .ule(std::abs(NewF.BaseOffset))) in GenerateCrossUseConstantOffsets()
3763 NewF.canonicalize(); in GenerateCrossUseConstantOffsets()
3764 (void)InsertFormula(LU, LUIdx, NewF); in GenerateCrossUseConstantOffsets()
3771 Formula NewF = F; in GenerateCrossUseConstantOffsets() local
[all …]
DFloat2Int.cpp322 APFloat NewF = F; in walkForwards() local
323 auto Res = NewF.roundToIntegral(APFloat::rmNearestTiesToEven); in walkForwards()
324 if (Res != APFloat::opOK || NewF.compare(F) != APFloat::cmpEqual) { in walkForwards()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/IPO/
DThinLTOBitcodeWriter.cpp156 Function *NewF = in simplifyExternals() local
158 NewF->setVisibility(F.getVisibility()); in simplifyExternals()
159 NewF->takeName(&F); in simplifyExternals()
160 F.replaceAllUsesWith(ConstantExpr::getBitCast(NewF, F.getType())); in simplifyExternals()
DArgumentPromotion.cpp982 Function *NewF = promoteArguments(&OldF, AARGetter, MaxElements, None); in run() local
983 if (!NewF) in run()
992 C.getOuterRefSCC().replaceNodeFunction(N, *NewF); in run()
1081 if (Function *NewF = promoteArguments(OldF, AARGetter, MaxElements, in runOnSCC() local
1086 CallGraphNode *NewNode = CG.getOrInsertFunction(NewF); in runOnSCC()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/
DLoopStrengthReduce.cpp4085 Formula NewF = F; in GenerateCrossUseConstantOffsets() local
4086 NewF.BaseOffset = Offset; in GenerateCrossUseConstantOffsets()
4088 NewF)) in GenerateCrossUseConstantOffsets()
4090 NewF.ScaledReg = SE.getAddExpr(NegImmS, NewF.ScaledReg); in GenerateCrossUseConstantOffsets()
4095 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(NewF.ScaledReg)) in GenerateCrossUseConstantOffsets()
4096 if (C->getValue()->isNegative() != (NewF.BaseOffset < 0) && in GenerateCrossUseConstantOffsets()
4098 .ule(std::abs(NewF.BaseOffset))) in GenerateCrossUseConstantOffsets()
4102 NewF.canonicalize(*this->L); in GenerateCrossUseConstantOffsets()
4103 (void)InsertFormula(LU, LUIdx, NewF); in GenerateCrossUseConstantOffsets()
4110 Formula NewF = F; in GenerateCrossUseConstantOffsets() local
[all …]
DFloat2Int.cpp307 APFloat NewF = F; in walkForwards() local
308 auto Res = NewF.roundToIntegral(APFloat::rmNearestTiesToEven); in walkForwards()
309 if (Res != APFloat::opOK || NewF.compare(F) != APFloat::cmpEqual) { in walkForwards()
/external/llvm/lib/Bitcode/Writer/
DValueEnumerator.h77 bool hasDifferentFunction(unsigned NewF) const { return F && F != NewF; } in hasDifferentFunction()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Bitcode/Writer/
DValueEnumerator.h82 bool hasDifferentFunction(unsigned NewF) const { return F && F != NewF; } in hasDifferentFunction()
/external/llvm/lib/Transforms/Utils/
DCloneFunction.cpp198 Function *NewF = in CloneFunction() local
202 Function::arg_iterator DestI = NewF->arg_begin(); in CloneFunction()
210 CloneFunctionInto(NewF, F, VMap, /*ModuleLevelChanges=*/false, Returns, "", in CloneFunction()
213 return NewF; in CloneFunction()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/
DLazyCallGraph.cpp136 void LazyCallGraph::Node::replaceFunction(Function &NewF) { in replaceFunction() argument
137 assert(F != &NewF && "Must not replace a function with itself!"); in replaceFunction()
138 F = &NewF; in replaceFunction()
1432 void LazyCallGraph::RefSCC::replaceNodeFunction(Node &N, Function &NewF) { in replaceNodeFunction() argument
1442 assert(G->NodeMap.find(&NewF) == G->NodeMap.end() && in replaceNodeFunction()
1451 assert(&OldF != &NewF && "Cannot replace a function with itself!"); in replaceNodeFunction()
1456 N.replaceFunction(NewF); in replaceNodeFunction()
1460 G->NodeMap[&NewF] = &N; in replaceNodeFunction()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/
DCloneFunction.cpp238 Function *NewF = in CloneFunction() local
242 Function::arg_iterator DestI = NewF->arg_begin(); in CloneFunction()
250 CloneFunctionInto(NewF, F, VMap, F->getSubprogram() != nullptr, Returns, "", in CloneFunction()
253 return NewF; in CloneFunction()
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/Transforms/Utils/
DCloning.cpp646 Function *NewF = NewM->getFunction("f"); in TEST_F() local
647 DISubprogram *SP = NewF->getSubprogram(); in TEST_F()
712 Function *NewF = NewM->getFunction("f"); in TEST_F() local
713 EXPECT_EQ(CD, NewF->getComdat()); in TEST_F()
/external/llvm/unittests/Transforms/Utils/
DCloning.cpp454 Function *NewF = NewM->getFunction("f"); in TEST_F() local
455 DISubprogram *SP = NewF->getSubprogram(); in TEST_F()
/external/llvm/lib/Linker/
DIRMover.cpp650 if (auto *NewF = dyn_cast<Function>(NewGV)) { in copyGlobalValueProto() local
651 NewF->setPersonalityFn(nullptr); in copyGlobalValueProto()
652 NewF->setPrefixData(nullptr); in copyGlobalValueProto()
653 NewF->setPrologueData(nullptr); in copyGlobalValueProto()

12