Lines Matching refs:Loop
2347 static void PrintParentLoopComment(raw_ostream &OS, const MachineLoop *Loop,
2349 if (!Loop) return;
2350 PrintParentLoopComment(OS, Loop->getParentLoop(), FunctionNumber);
2351 OS.indent(Loop->getLoopDepth()*2)
2352 << "Parent Loop BB" << FunctionNumber << "_"
2353 << Loop->getHeader()->getNumber()
2354 << " Depth=" << Loop->getLoopDepth() << '\n';
2359 /// the loop for this basic block, with nesting.
2360 static void PrintChildLoopComment(raw_ostream &OS, const MachineLoop *Loop,
2362 // Add child loop information
2363 for (const MachineLoop *CL : *Loop) {
2365 << "Child Loop BB" << FunctionNumber << "_"
2376 // Add loop depth information
2377 const MachineLoop *Loop = LI->getLoopFor(&MBB);
2378 if (!Loop) return;
2380 MachineBasicBlock *Header = Loop->getHeader();
2381 assert(Header && "No header for loop");
2383 // If this block is not a loop header, just print out what is the loop header
2386 AP.OutStreamer->AddComment(" in Loop: Header=BB" +
2388 Twine(Loop->getHeader()->getNumber())+
2389 " Depth="+Twine(Loop->getLoopDepth()));
2393 // Otherwise, it is a loop header. Print out information about child and
2397 PrintParentLoopComment(OS, Loop->getParentLoop(), AP.getFunctionNumber());
2400 OS.indent(Loop->getLoopDepth()*2-2);
2403 if (Loop->empty())
2405 OS << "Loop Header: Depth=" + Twine(Loop->getLoopDepth()) << '\n';
2407 PrintChildLoopComment(OS, Loop, AP.getFunctionNumber());