Lines Matching refs:LoLoop
515 void ConvertVPTBlocks(LowOverheadLoop &LoLoop);
517 MachineInstr *ExpandLoopStart(LowOverheadLoop &LoLoop);
519 void Expand(LowOverheadLoop &LoLoop);
521 void IterationCountDCE(LowOverheadLoop &LoLoop);
1301 LowOverheadLoop LoLoop(*ML, *MLI, *RDA, *TRI, *TII); in ProcessLoop() local
1305 if (LoLoop.Preheader) in ProcessLoop()
1306 LoLoop.Start = SearchForStart(LoLoop.Preheader); in ProcessLoop()
1318 LoLoop.Dec = &MI; in ProcessLoop()
1320 LoLoop.End = &MI; in ProcessLoop()
1322 LoLoop.End = LoLoop.Dec = &MI; in ProcessLoop()
1324 LoLoop.Start = &MI; in ProcessLoop()
1329 LoLoop.Revert = true; in ProcessLoop()
1334 LoLoop.AnalyseMVEInst(&MI); in ProcessLoop()
1339 LLVM_DEBUG(LoLoop.dump()); in ProcessLoop()
1340 if (!LoLoop.FoundAllComponents()) { in ProcessLoop()
1345 assert(LoLoop.Start->getOpcode() != ARM::t2WhileLoopStart && in ProcessLoop()
1351 if (LoLoop.Dec != LoLoop.End) { in ProcessLoop()
1353 RDA->getReachingLocalUses(LoLoop.Dec, MCRegister::from(ARM::LR), Uses); in ProcessLoop()
1354 if (Uses.size() > 1 || !Uses.count(LoLoop.End)) { in ProcessLoop()
1356 LoLoop.Revert = true; in ProcessLoop()
1359 LoLoop.Validate(BBUtils.get()); in ProcessLoop()
1360 Expand(LoLoop); in ProcessLoop()
1465 void ARMLowOverheadLoops::IterationCountDCE(LowOverheadLoop &LoLoop) { in IterationCountDCE() argument
1466 if (!LoLoop.IsTailPredicationLegal()) in IterationCountDCE()
1471 MachineInstr *Def = RDA->getMIOperand(LoLoop.Start, 1); in IterationCountDCE()
1478 SmallPtrSet<MachineInstr*, 4> Killed = { LoLoop.Start, LoLoop.Dec, in IterationCountDCE()
1479 LoLoop.End }; in IterationCountDCE()
1480 if (!TryRemove(Def, *RDA, LoLoop.ToRemove, Killed)) in IterationCountDCE()
1484 MachineInstr* ARMLowOverheadLoops::ExpandLoopStart(LowOverheadLoop &LoLoop) { in ExpandLoopStart() argument
1488 IterationCountDCE(LoLoop); in ExpandLoopStart()
1490 MachineBasicBlock::iterator InsertPt = LoLoop.StartInsertPt; in ExpandLoopStart()
1491 MachineInstr *Start = LoLoop.Start; in ExpandLoopStart()
1492 MachineBasicBlock *MBB = LoLoop.StartInsertBB; in ExpandLoopStart()
1493 unsigned Opc = LoLoop.getStartOpcode(); in ExpandLoopStart()
1494 MachineOperand &Count = LoLoop.getLoopStartOperand(); in ExpandLoopStart()
1514 LoLoop.ToRemove.insert(Start); in ExpandLoopStart()
1518 void ARMLowOverheadLoops::ConvertVPTBlocks(LowOverheadLoop &LoLoop) { in ConvertVPTBlocks() argument
1531 for (auto &Block : LoLoop.getVPTBlocks()) { in ConvertVPTBlocks()
1548 LoLoop.BlockMasksToRecompute.insert(MIB.getInstr()); in ConvertVPTBlocks()
1549 LoLoop.ToRemove.insert(TheVCMP); in ConvertVPTBlocks()
1602 LoLoop.BlockMasksToRecompute.insert(MIB.getInstr()); in ConvertVPTBlocks()
1611 LoLoop.ToRemove.insert(VPST); in ConvertVPTBlocks()
1619 LoLoop.ToRemove.insert(VPST); in ConvertVPTBlocks()
1621 LoLoop.BlockMasksToRecompute.insert(VPST); in ConvertVPTBlocks()
1633 !LoLoop.ToRemove.contains(VprDef)) { in ConvertVPTBlocks()
1646 LoLoop.ToRemove.insert(VPST); in ConvertVPTBlocks()
1652 LoLoop.ToRemove.insert(LoLoop.VCTPs.begin(), LoLoop.VCTPs.end()); in ConvertVPTBlocks()
1655 void ARMLowOverheadLoops::Expand(LowOverheadLoop &LoLoop) { in Expand() argument
1658 auto ExpandLoopEnd = [this](LowOverheadLoop &LoLoop) { in Expand() argument
1659 MachineInstr *End = LoLoop.End; in Expand()
1661 unsigned Opc = LoLoop.IsTailPredicationLegal() ? in Expand()
1666 unsigned Off = LoLoop.Dec == LoLoop.End ? 1 : 0; in Expand()
1670 LoLoop.ToRemove.insert(LoLoop.Dec); in Expand()
1671 LoLoop.ToRemove.insert(End); in Expand()
1692 if (LoLoop.Revert) { in Expand()
1693 if (isWhileLoopStart(*LoLoop.Start)) in Expand()
1694 RevertWhile(LoLoop.Start); in Expand()
1696 RevertDo(LoLoop.Start); in Expand()
1697 if (LoLoop.Dec == LoLoop.End) in Expand()
1698 RevertLoopEndDec(LoLoop.End); in Expand()
1700 RevertLoopEnd(LoLoop.End, RevertLoopDec(LoLoop.Dec)); in Expand()
1702 LoLoop.Start = ExpandLoopStart(LoLoop); in Expand()
1703 if (LoLoop.Start) in Expand()
1704 RemoveDeadBranch(LoLoop.Start); in Expand()
1705 LoLoop.End = ExpandLoopEnd(LoLoop); in Expand()
1706 RemoveDeadBranch(LoLoop.End); in Expand()
1707 if (LoLoop.IsTailPredicationLegal()) in Expand()
1708 ConvertVPTBlocks(LoLoop); in Expand()
1709 for (auto *I : LoLoop.ToRemove) { in Expand()
1713 for (auto *I : LoLoop.BlockMasksToRecompute) { in Expand()
1720 PostOrderLoopTraversal DFS(LoLoop.ML, *MLI); in Expand()