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);
674 void CodeExtractor::moveCodeToFunction(Function *newFunction) {
677 Function::BasicBlockListType &newBlocks = newFunction->getBasicBlockList();
731 Function *newFunction = constructFunction(inputs, outputs, header,
736 emitCallAndSwitchStatement(newFunction, codeReplacer, inputs, outputs);
738 moveCodeToFunction(newFunction);
771 //cerr << "NEW FUNCTION: " << *newFunction;
772 // verifyFunction(*newFunction);
777 DEBUG(if (verifyFunction(*newFunction))
779 return newFunction;