Lines Matching refs:Loop
323 const LoopData *OuterLoop, LoopData &Loop, Distribution &Dist) { in addLoopSuccessorsToDist() argument
325 for (const auto &I : Loop.Exits) in addLoopSuccessorsToDist()
326 if (!addToDist(Dist, OuterLoop, Loop.getHeader(), I.first, in addLoopSuccessorsToDist()
335 void BlockFrequencyInfoImplBase::computeLoopScale(LoopData &Loop) { in computeLoopScale() argument
337 DEBUG(dbgs() << "compute-loop-scale: " << getLoopName(Loop) << "\n"); in computeLoopScale()
353 for (auto &Mass : Loop.BackedgeMass) in computeLoopScale()
360 Loop.Scale = in computeLoopScale()
365 << " - scale = " << Loop.Scale << "\n"); in computeLoopScale()
369 void BlockFrequencyInfoImplBase::packageLoop(LoopData &Loop) { in packageLoop() argument
370 DEBUG(dbgs() << "packaging-loop: " << getLoopName(Loop) << "\n"); in packageLoop()
373 for (const BlockNode &M : Loop.Nodes) { in packageLoop()
374 if (auto *Loop = Working[M.Index].getPackagedLoop()) in packageLoop() local
375 Loop->Exits.clear(); in packageLoop()
378 Loop.IsPackaged = true; in packageLoop()
468 static void unwrapLoop(BlockFrequencyInfoImplBase &BFI, LoopData &Loop) { in unwrapLoop() argument
469 DEBUG(dbgs() << "unwrap-loop-package: " << BFI.getLoopName(Loop) in unwrapLoop()
470 << ": mass = " << Loop.Mass << ", scale = " << Loop.Scale in unwrapLoop()
472 Loop.Scale *= Loop.Mass.toScaled(); in unwrapLoop()
473 Loop.IsPackaged = false; in unwrapLoop()
474 DEBUG(dbgs() << " => combined-scale = " << Loop.Scale << "\n"); in unwrapLoop()
479 for (const BlockNode &N : Loop.Nodes) { in unwrapLoop()
483 Scaled64 New = Loop.Scale * F; in unwrapLoop()
495 for (LoopData &Loop : Loops) in unwrapLoops()
496 unwrapLoop(*this, Loop); in unwrapLoops()
545 BlockFrequencyInfoImplBase::getLoopName(const LoopData &Loop) const { in getLoopName()
546 return getBlockName(Loop.getHeader()) + (Loop.isIrreducible() ? "**" : "*"); in getLoopName()
692 auto Loop = BFI.Loops.emplace(Insert, OuterLoop, Headers.begin(), in createIrreducibleLoop() local
696 for (const auto &N : Loop->Nodes) in createIrreducibleLoop()
698 BFI.Working[N.Index].Loop->Parent = &*Loop; in createIrreducibleLoop()
700 BFI.Working[N.Index].Loop = &*Loop; in createIrreducibleLoop()
735 void BlockFrequencyInfoImplBase::adjustLoopHeaderMass(LoopData &Loop) { in adjustLoopHeaderMass() argument
736 assert(Loop.isIrreducible() && "this only makes sense on irreducible loops"); in adjustLoopHeaderMass()
748 for (uint32_t H = 0; H < Loop.NumHeaders; ++H) { in adjustLoopHeaderMass()
749 auto &HeaderNode = Loop.Nodes[H]; in adjustLoopHeaderMass()
750 auto &BackedgeMass = Loop.BackedgeMass[Loop.getHeaderIndex(HeaderNode)]; in adjustLoopHeaderMass()