Lines Matching refs:LoLoop
521 void ConvertVPTBlocks(LowOverheadLoop &LoLoop);
523 MachineInstr *ExpandLoopStart(LowOverheadLoop &LoLoop);
525 void Expand(LowOverheadLoop &LoLoop);
527 void IterationCountDCE(LowOverheadLoop &LoLoop);
1359 LowOverheadLoop LoLoop(*ML, *MLI, *RDA, *TRI, *TII); in ProcessLoop() local
1363 if (LoLoop.Preheader) in ProcessLoop()
1364 LoLoop.Start = SearchForStart(LoLoop.Preheader); in ProcessLoop()
1376 LoLoop.Dec = &MI; in ProcessLoop()
1378 LoLoop.End = &MI; in ProcessLoop()
1380 LoLoop.End = LoLoop.Dec = &MI; in ProcessLoop()
1382 LoLoop.Start = &MI; in ProcessLoop()
1387 LoLoop.Revert = true; in ProcessLoop()
1392 LoLoop.AnalyseMVEInst(&MI); in ProcessLoop()
1397 LLVM_DEBUG(LoLoop.dump()); in ProcessLoop()
1398 if (!LoLoop.FoundAllComponents()) { in ProcessLoop()
1403 assert(LoLoop.Start->getOpcode() != ARM::t2WhileLoopStart && in ProcessLoop()
1409 if (LoLoop.Dec != LoLoop.End) { in ProcessLoop()
1411 RDA->getReachingLocalUses(LoLoop.Dec, MCRegister::from(ARM::LR), Uses); in ProcessLoop()
1412 if (Uses.size() > 1 || !Uses.count(LoLoop.End)) { in ProcessLoop()
1414 LoLoop.Revert = true; in ProcessLoop()
1417 LoLoop.Validate(BBUtils.get()); in ProcessLoop()
1418 Expand(LoLoop); in ProcessLoop()
1523 void ARMLowOverheadLoops::IterationCountDCE(LowOverheadLoop &LoLoop) { in IterationCountDCE() argument
1524 if (!LoLoop.IsTailPredicationLegal()) in IterationCountDCE()
1529 MachineInstr *Def = RDA->getMIOperand(LoLoop.Start, 1); in IterationCountDCE()
1536 SmallPtrSet<MachineInstr*, 4> Killed = { LoLoop.Start, LoLoop.Dec, in IterationCountDCE()
1537 LoLoop.End }; in IterationCountDCE()
1538 if (!TryRemove(Def, *RDA, LoLoop.ToRemove, Killed)) in IterationCountDCE()
1542 MachineInstr* ARMLowOverheadLoops::ExpandLoopStart(LowOverheadLoop &LoLoop) { in ExpandLoopStart() argument
1546 IterationCountDCE(LoLoop); in ExpandLoopStart()
1548 MachineBasicBlock::iterator InsertPt = LoLoop.StartInsertPt; in ExpandLoopStart()
1549 MachineInstr *Start = LoLoop.Start; in ExpandLoopStart()
1550 MachineBasicBlock *MBB = LoLoop.StartInsertBB; in ExpandLoopStart()
1551 unsigned Opc = LoLoop.getStartOpcode(); in ExpandLoopStart()
1552 MachineOperand &Count = LoLoop.getLoopStartOperand(); in ExpandLoopStart()
1572 LoLoop.ToRemove.insert(Start); in ExpandLoopStart()
1576 void ARMLowOverheadLoops::ConvertVPTBlocks(LowOverheadLoop &LoLoop) { in ConvertVPTBlocks() argument
1589 for (auto &Block : LoLoop.getVPTBlocks()) { in ConvertVPTBlocks()
1606 LoLoop.BlockMasksToRecompute.insert(MIB.getInstr()); in ConvertVPTBlocks()
1607 LoLoop.ToRemove.insert(TheVCMP); in ConvertVPTBlocks()
1660 LoLoop.BlockMasksToRecompute.insert(MIB.getInstr()); in ConvertVPTBlocks()
1669 LoLoop.ToRemove.insert(VPST); in ConvertVPTBlocks()
1677 LoLoop.ToRemove.insert(VPST); in ConvertVPTBlocks()
1679 LoLoop.BlockMasksToRecompute.insert(VPST); in ConvertVPTBlocks()
1691 !LoLoop.ToRemove.contains(VprDef)) { in ConvertVPTBlocks()
1704 LoLoop.ToRemove.insert(VPST); in ConvertVPTBlocks()
1710 LoLoop.ToRemove.insert(LoLoop.VCTPs.begin(), LoLoop.VCTPs.end()); in ConvertVPTBlocks()
1713 void ARMLowOverheadLoops::Expand(LowOverheadLoop &LoLoop) { in Expand() argument
1716 auto ExpandLoopEnd = [this](LowOverheadLoop &LoLoop) { in Expand() argument
1717 MachineInstr *End = LoLoop.End; in Expand()
1719 unsigned Opc = LoLoop.IsTailPredicationLegal() ? in Expand()
1724 unsigned Off = LoLoop.Dec == LoLoop.End ? 1 : 0; in Expand()
1728 LoLoop.ToRemove.insert(LoLoop.Dec); in Expand()
1729 LoLoop.ToRemove.insert(End); in Expand()
1775 if (LoLoop.Revert) { in Expand()
1776 if (isWhileLoopStart(*LoLoop.Start)) in Expand()
1777 RevertWhile(LoLoop.Start); in Expand()
1779 RevertDo(LoLoop.Start); in Expand()
1780 if (LoLoop.Dec == LoLoop.End) in Expand()
1781 RevertLoopEndDec(LoLoop.End); in Expand()
1783 RevertLoopEnd(LoLoop.End, RevertLoopDec(LoLoop.Dec)); in Expand()
1785 ExpandVMOVCopies(LoLoop.VMOVCopies); in Expand()
1786 LoLoop.Start = ExpandLoopStart(LoLoop); in Expand()
1787 if (LoLoop.Start) in Expand()
1788 RemoveDeadBranch(LoLoop.Start); in Expand()
1789 LoLoop.End = ExpandLoopEnd(LoLoop); in Expand()
1790 RemoveDeadBranch(LoLoop.End); in Expand()
1791 if (LoLoop.IsTailPredicationLegal()) in Expand()
1792 ConvertVPTBlocks(LoLoop); in Expand()
1793 for (auto *I : LoLoop.ToRemove) { in Expand()
1797 for (auto *I : LoLoop.BlockMasksToRecompute) { in Expand()
1804 PostOrderLoopTraversal DFS(LoLoop.ML, *MLI); in Expand()