Lines Matching defs:newFunction
344 Function *newFunction = Function::Create(funcType,
350 newFunction->setDoesNotThrow();
352 newFunction->getBasicBlockList().push_back(newRootNode);
355 Function::arg_iterator AI = newFunction->arg_begin();
365 TerminatorInst *TI = newFunction->begin()->getTerminator();
382 AI = newFunction->arg_begin();
401 return newFunction;
422 emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer,
428 LLVMContext &Context = newFunction->getContext();
458 Type *StructArgTy = StructType::get(newFunction->getContext(), ArgTypes);
478 CallInst *call = CallInst::Create(newFunction, params,
482 Function::arg_iterator OutputArgBegin = newFunction->arg_begin();
539 newFunction);
673 void CodeExtractor::moveCodeToFunction(Function *newFunction) {
676 Function::BasicBlockListType &newBlocks = newFunction->getBasicBlockList();
730 Function *newFunction = constructFunction(inputs, outputs, header,
735 emitCallAndSwitchStatement(newFunction, codeReplacer, inputs, outputs);
737 moveCodeToFunction(newFunction);
770 //cerr << "NEW FUNCTION: " << *newFunction;
771 // verifyFunction(*newFunction);
776 DEBUG(if (verifyFunction(*newFunction))
778 return newFunction;