Lines Matching refs:Function
1 //===- ExtractFunction.cpp - Extract a function from Program --------------===//
63 const Function *PF = PBB->getParent();
69 Function::iterator RBI = RFI->begin(); // Get iterator to corresponding BB
70 std::advance(RBI, std::distance(PF->begin(), Function::const_iterator(PBB)));
130 /// function. This returns null if there are no extractable loops in the
162 // DeleteFunctionBody - "Remove" the function by deleting all of its basic
165 void llvm::DeleteFunctionBody(Function *F) {
166 // delete the body of the function...
168 assert(F->isDeclaration() && "This didn't make the function external!");
173 static Constant *GetTorInit(std::vector<std::pair<Function*, int> > &TorList) {
202 std::vector<std::pair<Function*, int> > M1Tors, M2Tors;
220 if (Function *F = dyn_cast<Function>(FP)) {
224 // Map to M2's version of the function.
225 F = cast<Function>(VMap[F]);
259 const std::vector<Function*> &F,
281 std::set<Function *> TestFunctions;
283 Function *TNOF = cast<Function>(VMap[F[i]]);
284 DEBUG(errs() << "Removing function ");
287 TestFunctions.insert(cast<Function>(NewVMap[TNOF]));
288 DeleteFunctionBody(TNOF); // Function is now external in this module!
314 /// this function should return null, otherwise it returns a new Module.