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
138 // After extraction, the loop is replaced by a function call, so
149 // program into a function if it can. This is used by bugpoint.
169 void SplitLandingPadPreds(Function *F);
218 void BlockExtractorPass::SplitLandingPadPreds(Function *F) {
219 for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) {
249 Function *F = BB->getParent();
251 // Map the corresponding function in this module.
252 Function *MF = M.getFunction(F->getName());
253 assert(MF->getFunctionType() == F->getFunctionType() && "Wrong function?");
255 // Figure out which index the basic block is in its function.
256 Function::iterator BBI = MF->begin();
257 std::advance(BBI, std::distance(F->begin(), Function::iterator(BB)));
263 // every Function. Fortunately, this is always empty except when used by
270 Function &F = *FI;
273 for (Function::iterator BI = F.begin(), BE = F.end(); BI != BE; ++BI) {
289 for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)