Lines Matching refs:Function
1 //===- LoopExtractor.cpp - Extract each loop into a new function ----------===//
11 // top-level loop into its own new function. If the loop is the ONLY loop in a
12 // given function, it is not touched. This is a pass most useful for debugging
74 "Extract at most one loop into a new function", false, false)
77 // program into a function if it can.
93 // If there is more than one top-level loop in this function, extract all of
95 // this function is more than a minimal wrapper around the loop, extract
121 // function. An infinite cycle occurs when it tries to extract that loop as
137 // After extraction, the loop is replaced by a function call, so
148 // program into a function if it can. This is used by bugpoint.
168 void SplitLandingPadPreds(Function *F);
217 void BlockExtractorPass::SplitLandingPadPreds(Function *F) {
218 for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) {
248 Function *F = BB->getParent();
250 // Map the corresponding function in this module.
251 Function *MF = M.getFunction(F->getName());
252 assert(MF->getFunctionType() == F->getFunctionType() && "Wrong function?");
254 // Figure out which index the basic block is in its function.
255 Function::iterator BBI = MF->begin();
256 std::advance(BBI, std::distance(F->begin(), Function::iterator(BB)));
262 // every Function. Fortunately, this is always empty except when used by
269 Function &F = *FI;
272 for (Function::iterator BI = F.begin(), BE = F.end(); BI != BE; ++BI) {
288 for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)