Lines Matching refs:newFunction
885 Function *newFunction = Function::Create( in constructFunction() local
1000 newFunction->addFnAttr(Attr); in constructFunction()
1002 newFunction->getBasicBlockList().push_back(newRootNode); in constructFunction()
1006 Function::arg_iterator ScalarAI = newFunction->arg_begin(); in constructFunction()
1017 Instruction *TI = newFunction->begin()->getTerminator(); in constructFunction()
1035 ScalarAI = newFunction->arg_begin(); in constructFunction()
1056 return newFunction; in constructFunction()
1143 CallInst *CodeExtractor::emitCallAndSwitchStatement(Function *newFunction, in emitCallAndSwitchStatement() argument
1152 Module *M = newFunction->getParent(); in emitCallAndSwitchStatement()
1196 StructArgTy = StructType::get(newFunction->getContext(), ArgTypes); in emitCallAndSwitchStatement()
1219 call = CallInst::Create(newFunction, params, in emitCallAndSwitchStatement()
1226 if (auto DL = newFunction->getEntryBlock().getTerminator()->getDebugLoc()) in emitCallAndSwitchStatement()
1234 newFunction->addParamAttr(SwiftErrArgNo, Attribute::SwiftError); in emitCallAndSwitchStatement()
1294 newFunction); in emitCallAndSwitchStatement()
1336 Function::arg_iterator ScalarOutputArgBegin = newFunction->arg_begin(); in emitCallAndSwitchStatement()
1338 Function::arg_iterator AggOutputArgBegin = newFunction->arg_begin(); in emitCallAndSwitchStatement()
1359 assert((InsertBefore->getFunction() == newFunction || in emitCallAndSwitchStatement()
1363 assert(AggOutputArgBegin != newFunction->arg_end() && in emitCallAndSwitchStatement()
1378 assert(ScalarOutputArgBegin != newFunction->arg_end() && in emitCallAndSwitchStatement()
1437 void CodeExtractor::moveCodeToFunction(Function *newFunction) { in moveCodeToFunction() argument
1440 Function::BasicBlockListType &newBlocks = newFunction->getBasicBlockList(); in moveCodeToFunction()
1442 auto newFuncIt = newFunction->front().getIterator(); in moveCodeToFunction()
1772 Function *newFunction = in extractCodeRegion() local
1780 newFunction->setEntryCount( in extractCodeRegion()
1786 emitCallAndSwitchStatement(newFunction, codeReplacer, inputs, outputs); in extractCodeRegion()
1788 moveCodeToFunction(newFunction); in extractCodeRegion()
1797 newFunction->setPersonalityFn(oldFunction->getPersonalityFn()); in extractCodeRegion()
1830 fixupDebugInfoPostExtraction(*oldFunction, *newFunction, *TheCall); in extractCodeRegion()
1835 bool doesNotReturn = none_of(*newFunction, [](const BasicBlock &BB) { in extractCodeRegion()
1840 newFunction->setDoesNotReturn(); in extractCodeRegion()
1842 LLVM_DEBUG(if (verifyFunction(*newFunction, &errs())) { in extractCodeRegion()
1843 newFunction->dump(); in extractCodeRegion()
1848 LLVM_DEBUG(if (AC && verifyAssumptionCache(*oldFunction, *newFunction, AC)) in extractCodeRegion()
1850 return newFunction; in extractCodeRegion()