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