Lines Matching defs:Save
11 // The safe point for the prologue (resp. epilogue) is called Save
15 // between 2) two executions of the Save (resp. Restore) point there is an
16 // execution of the Restore (resp. Save) point.
20 // Save
24 // Indeed, the execution looks like Save -> Restore -> Save -> Restore ...
27 // Save
34 // Indeed, the execution looks like Save -> Save -> ... -> Restore -> Restore.
122 MachineBasicBlock *Save = nullptr;
133 /// Hold the loop information. Used to determine if Save and Restore
172 /// after Save and before Restore.
191 /// Update the Save and Restore points such that \p MBB is in
192 /// the region that is dominated by Save and post-dominated by Restore
193 /// and Save and Restore still match the safe point definition.
194 /// Such point may not exist and Save and/or Restore may be null after
229 Save = nullptr;
247 /// Check whether or not Save and Restore points are still interesting for
249 bool ArePointsInteresting() const { return Save != Entry && Save && Restore; }
580 InitSave = Save;
662 Save = NewSave;
668 assert((MDT->dominates(Save, Restore) && MPDT->dominates(Restore, Save)) &&
670 assert((!MLI->getLoopFor(Save) && !MLI->getLoopFor(Restore)) &&
672 assert((EntryFreq >= MBFI->getBlockFreq(Save) &&
681 if (!Save)
682 Save = &MBB;
684 Save = MDT->findNearestCommonDominator(Save, &MBB);
685 assert(Save);
722 // Make sure Save and Restore are suitable for shrink-wrapping:
723 // 1. all path from Save needs to lead to Restore before exiting.
724 // 2. all path to Restore needs to go through Save from Entry.
726 // A. Save dominates Restore.
727 // B. Restore post-dominates Save.
728 // C. Save and Restore are in the same loop.
732 (!(SaveDominatesRestore = MDT->dominates(Save, Restore)) ||
733 !(RestorePostDominatesSave = MPDT->dominates(Restore, Save)) ||
738 // Save
744 // All the uses/defs of CSRs are dominated by Save and post-dominated
746 // Restore and before Save are executed.
751 MLI->getLoopFor(Save) || MLI->getLoopFor(Restore))) {
754 Save = MDT->findNearestCommonDominator(Save, Restore);
759 Restore = MPDT->findNearestCommonDominator(Restore, Save);
762 if (Restore && (MLI->getLoopFor(Save) || MLI->getLoopFor(Restore))) {
763 if (MLI->getLoopDepth(Save) > MLI->getLoopDepth(Restore)) {
764 // Push Save outside of this loop if immediate dominator is different
766 Save = FindIDom<>(*Save, Save->predecessors(), *MDT);
767 if (!Save)
849 // Save (resp. restore) point must dominate (resp. post dominate)
870 assert(!Save && !Restore && "We miss a shrink-wrap opportunity?!");
882 << printMBBReference(*Save) << ' '
883 << printBlockFreq(*MBFI, *Save)
888 if (((IsSaveCheap = EntryFreq >= MBFI->getBlockFreq(Save)) &&
890 ((TargetCanUseSaveAsPrologue = TFI->canUseAsPrologue(*Save)) &&
897 Save = FindIDom<>(*Save, Save->predecessors(), *MDT);
898 if (!Save)
900 NewBB = Save;
909 } while (Save && Restore);
958 << printMBBReference(*Save) << ' '
962 MFI.setSavePoint(Save);