Home | History | Annotate | Download | only in bugpoint

Lines Matching refs:Function

1 //===- ExtractFunction.cpp - Extract a function from Program --------------===//
51 Function* globalInitUsesExternalBA(GlobalVariable* GV) {
69 Function *F = BA->getFunction();
95 const Function *PF = PBB->getParent();
101 Function::iterator RBI = RFI->begin(); // Get iterator to corresponding BB
102 std::advance(RBI, std::distance(PF->begin(), Function::const_iterator(PBB)));
162 /// function. This returns null if there are no extractable loops in the
194 // DeleteFunctionBody - "Remove" the function by deleting all of its basic
197 void llvm::DeleteFunctionBody(Function *F) {
198 // delete the body of the function...
200 assert(F->isDeclaration() && "This didn't make the function external!");
205 static Constant *GetTorInit(std::vector<std::pair<Function*, int> > &TorList) {
234 std::vector<std::pair<Function*, int> > M1Tors, M2Tors;
252 if (Function *F = dyn_cast<Function>(FP)) {
256 // Map to M2's version of the function.
257 F = cast<Function>(VMap[F]);
291 const std::vector<Function*> &F,
308 std::set<Function *> TestFunctions;
310 Function *TNOF = cast<Function>(VMap[F[i]]);
311 DEBUG(errs() << "Removing function ");
314 TestFunctions.insert(cast<Function>(NewVMap[TNOF]));
315 DeleteFunctionBody(TNOF); // Function is now external in this module!
329 if (Function *TestFn = globalInitUsesExternalBA(I)) {
330 if (Function *SafeFn = globalInitUsesExternalBA(GV)) {
335 "from safe function '" << SafeFn->getName()
336 << "' and from test function '" << TestFn->getName() << "'.\n";
362 /// this function should return null, otherwise it returns a new Module.