Lines Matching refs:LoLoop
518 void ConvertVPTBlocks(LowOverheadLoop &LoLoop);
520 MachineInstr *ExpandLoopStart(LowOverheadLoop &LoLoop);
522 void Expand(LowOverheadLoop &LoLoop);
524 void IterationCountDCE(LowOverheadLoop &LoLoop);
1347 LowOverheadLoop LoLoop(*ML, *MLI, *RDA, *TRI, *TII); in ProcessLoop() local
1351 if (LoLoop.Preheader) in ProcessLoop()
1352 LoLoop.Start = SearchForStart(LoLoop.Preheader); in ProcessLoop()
1364 LoLoop.Dec = &MI; in ProcessLoop()
1366 LoLoop.End = &MI; in ProcessLoop()
1368 LoLoop.End = LoLoop.Dec = &MI; in ProcessLoop()
1370 LoLoop.Start = &MI; in ProcessLoop()
1375 LoLoop.Revert = true; in ProcessLoop()
1380 LoLoop.AnalyseMVEInst(&MI); in ProcessLoop()
1385 LLVM_DEBUG(LoLoop.dump()); in ProcessLoop()
1386 if (!LoLoop.FoundAllComponents()) { in ProcessLoop()
1391 assert(LoLoop.Start->getOpcode() != ARM::t2WhileLoopStart && in ProcessLoop()
1397 if (LoLoop.Dec != LoLoop.End) { in ProcessLoop()
1399 RDA->getReachingLocalUses(LoLoop.Dec, MCRegister::from(ARM::LR), Uses); in ProcessLoop()
1400 if (Uses.size() > 1 || !Uses.count(LoLoop.End)) { in ProcessLoop()
1402 LoLoop.Revert = true; in ProcessLoop()
1405 LoLoop.Validate(BBUtils.get()); in ProcessLoop()
1406 Expand(LoLoop); in ProcessLoop()
1511 void ARMLowOverheadLoops::IterationCountDCE(LowOverheadLoop &LoLoop) { in IterationCountDCE() argument
1512 if (!LoLoop.IsTailPredicationLegal()) in IterationCountDCE()
1517 MachineInstr *Def = RDA->getMIOperand(LoLoop.Start, 1); in IterationCountDCE()
1524 SmallPtrSet<MachineInstr*, 4> Killed = { LoLoop.Start, LoLoop.Dec, in IterationCountDCE()
1525 LoLoop.End }; in IterationCountDCE()
1526 if (!TryRemove(Def, *RDA, LoLoop.ToRemove, Killed)) in IterationCountDCE()
1530 MachineInstr* ARMLowOverheadLoops::ExpandLoopStart(LowOverheadLoop &LoLoop) { in ExpandLoopStart() argument
1534 IterationCountDCE(LoLoop); in ExpandLoopStart()
1536 MachineBasicBlock::iterator InsertPt = LoLoop.StartInsertPt; in ExpandLoopStart()
1537 MachineInstr *Start = LoLoop.Start; in ExpandLoopStart()
1538 MachineBasicBlock *MBB = LoLoop.StartInsertBB; in ExpandLoopStart()
1539 unsigned Opc = LoLoop.getStartOpcode(); in ExpandLoopStart()
1540 MachineOperand &Count = LoLoop.getLoopStartOperand(); in ExpandLoopStart()
1561 LoLoop.ToRemove.insert(Start); in ExpandLoopStart()
1565 void ARMLowOverheadLoops::ConvertVPTBlocks(LowOverheadLoop &LoLoop) { in ConvertVPTBlocks() argument
1578 for (auto &Block : LoLoop.getVPTBlocks()) { in ConvertVPTBlocks()
1595 LoLoop.BlockMasksToRecompute.insert(MIB.getInstr()); in ConvertVPTBlocks()
1596 LoLoop.ToRemove.insert(TheVCMP); in ConvertVPTBlocks()
1600 if (LoLoop.VPTstate.isEntryPredicatedOnVCTP(Block, /*exclusive*/ true)) { in ConvertVPTBlocks()
1649 LoLoop.BlockMasksToRecompute.insert(MIB.getInstr()); in ConvertVPTBlocks()
1658 LoLoop.ToRemove.insert(VPST); in ConvertVPTBlocks()
1666 LoLoop.ToRemove.insert(VPST); in ConvertVPTBlocks()
1668 LoLoop.BlockMasksToRecompute.insert(VPST); in ConvertVPTBlocks()
1680 !LoLoop.ToRemove.contains(VprDef)) { in ConvertVPTBlocks()
1693 LoLoop.ToRemove.insert(VPST); in ConvertVPTBlocks()
1699 LoLoop.ToRemove.insert(LoLoop.VCTPs.begin(), LoLoop.VCTPs.end()); in ConvertVPTBlocks()
1702 void ARMLowOverheadLoops::Expand(LowOverheadLoop &LoLoop) { in Expand() argument
1705 auto ExpandLoopEnd = [this](LowOverheadLoop &LoLoop) { in Expand() argument
1706 MachineInstr *End = LoLoop.End; in Expand()
1708 unsigned Opc = LoLoop.IsTailPredicationLegal() ? in Expand()
1713 unsigned Off = LoLoop.Dec == LoLoop.End ? 1 : 0; in Expand()
1717 LoLoop.ToRemove.insert(LoLoop.Dec); in Expand()
1718 LoLoop.ToRemove.insert(End); in Expand()
1764 if (LoLoop.Revert) { in Expand()
1765 if (isWhileLoopStart(*LoLoop.Start)) in Expand()
1766 RevertWhile(LoLoop.Start); in Expand()
1768 RevertDo(LoLoop.Start); in Expand()
1769 if (LoLoop.Dec == LoLoop.End) in Expand()
1770 RevertLoopEndDec(LoLoop.End); in Expand()
1772 RevertLoopEnd(LoLoop.End, RevertLoopDec(LoLoop.Dec)); in Expand()
1774 ExpandVMOVCopies(LoLoop.VMOVCopies); in Expand()
1775 LoLoop.Start = ExpandLoopStart(LoLoop); in Expand()
1776 if (LoLoop.Start) in Expand()
1777 RemoveDeadBranch(LoLoop.Start); in Expand()
1778 LoLoop.End = ExpandLoopEnd(LoLoop); in Expand()
1779 RemoveDeadBranch(LoLoop.End); in Expand()
1780 if (LoLoop.IsTailPredicationLegal()) in Expand()
1781 ConvertVPTBlocks(LoLoop); in Expand()
1782 for (auto *I : LoLoop.ToRemove) { in Expand()
1786 for (auto *I : LoLoop.BlockMasksToRecompute) { in Expand()
1793 PostOrderLoopTraversal DFS(LoLoop.ML, *MLI); in Expand()