Lines Matching refs:LoopChain
537 BlockChain &LoopChain, const MachineBasicBlock *ExitingBB,
540 BlockChain &LoopChain, const MachineLoop &L,
2332 void MachineBlockPlacement::rotateLoop(BlockChain &LoopChain, in rotateLoop() argument
2339 MachineBasicBlock *Top = *LoopChain.begin(); in rotateLoop()
2340 MachineBasicBlock *Bottom = *std::prev(LoopChain.end()); in rotateLoop()
2370 BlockChain::iterator ExitIt = llvm::find(LoopChain, ExitingBB); in rotateLoop()
2371 if (ExitIt == LoopChain.end()) in rotateLoop()
2394 assert(std::next(ExitIt) != LoopChain.end() && in rotateLoop()
2404 std::rotate(LoopChain.begin(), std::next(ExitIt), LoopChain.end()); in rotateLoop()
2421 BlockChain &LoopChain, const MachineLoop &L, in rotateLoopWithProfile() argument
2423 auto RotationPos = LoopChain.end(); in rotateLoopWithProfile()
2424 MachineBasicBlock *ChainHeaderBB = *LoopChain.begin(); in rotateLoopWithProfile()
2467 for (auto *BB : LoopChain) { in rotateLoopWithProfile()
2486 for (auto Iter = LoopChain.begin(), TailIter = std::prev(LoopChain.end()), in rotateLoopWithProfile()
2487 EndIter = LoopChain.end(); in rotateLoopWithProfile()
2491 if (TailIter == LoopChain.end()) in rotateLoopWithProfile()
2492 TailIter = LoopChain.begin(); in rotateLoopWithProfile()
2502 if (Iter != LoopChain.begin()) in rotateLoopWithProfile()
2550 if (RotationPos != LoopChain.end()) { in rotateLoopWithProfile()
2553 std::rotate(LoopChain.begin(), RotationPos, LoopChain.end()); in rotateLoopWithProfile()
2639 BlockChain &LoopChain = *BlockToChain[LoopTop]; in buildLoopChains() local
2645 assert(LoopChain.UnscheduledPredecessors == 0 && in buildLoopChains()
2647 UpdatedPreds.insert(&LoopChain); in buildLoopChains()
2652 buildChain(LoopTop, LoopChain, &LoopBlockSet); in buildLoopChains()
2655 rotateLoopWithProfile(LoopChain, L, LoopBlockSet); in buildLoopChains()
2657 rotateLoop(LoopChain, PreferredLoopExit, ExitFreq, LoopBlockSet); in buildLoopChains()
2662 if (LoopChain.UnscheduledPredecessors) { in buildLoopChains()
2666 << " Chain header: " << getBlockName(*LoopChain.begin()) << "\n"; in buildLoopChains()
2668 for (MachineBasicBlock *ChainBB : LoopChain) { in buildLoopChains()
2676 << " Chain header: " << getBlockName(*LoopChain.begin()) << "\n" in buildLoopChains()
2686 << " Chain header: " << getBlockName(*LoopChain.begin()) << "\n" in buildLoopChains()