Lines Matching full: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.
123 MachineBasicBlock *Save = nullptr;
134 /// Hold the loop information. Used to determine if Save and Restore
173 /// after Save and before Restore.
192 /// Update the Save and Restore points such that \p MBB is in
193 /// the region that is dominated by Save and post-dominated by Restore
194 /// and Save and Restore still match the safe point definition.
195 /// Such point may not exist and Save and/or Restore may be null after
206 /// save point further. \return True if restore point is split.
212 /// 1. Any preds of current restore that are reachable by callee save/FI
230 Save = nullptr;
248 /// Check whether or not Save and Restore points are still interesting for
250 bool ArePointsInteresting() const { return Save != Entry && Save && Restore; }
588 InitSave = Save;
640 // Trying to reach out to the new save point which dominates all dirty blocks.
659 // from clean blocks and doing so can shrink the save point.
670 Save = NewSave;
676 assert((MDT->dominates(Save, Restore) && MPDT->dominates(Restore, Save)) &&
677 "Incorrect save or restore point due to dominance relations");
678 assert((!MLI->getLoopFor(Save) && !MLI->getLoopFor(Restore)) &&
679 "Unexpected save or restore point in a loop");
680 assert((EntryFreq >= MBFI->getBlockFreq(Save) &&
682 "Incorrect save or restore point based on block frequency");
689 if (!Save)
690 Save = &MBB;
692 Save = MDT->findNearestCommonDominator(Save, &MBB);
693 assert(Save);
730 // Make sure Save and Restore are suitable for shrink-wrapping:
731 // 1. all path from Save needs to lead to Restore before exiting.
732 // 2. all path to Restore needs to go through Save from Entry.
734 // A. Save dominates Restore.
735 // B. Restore post-dominates Save.
736 // C. Save and Restore are in the same loop.
740 (!(SaveDominatesRestore = MDT->dominates(Save, Restore)) ||
741 !(RestorePostDominatesSave = MPDT->dominates(Restore, Save)) ||
746 // Save
752 // All the uses/defs of CSRs are dominated by Save and post-dominated
754 // Restore and before Save are executed.
756 // For now, just push the restore/save points outside of loops.
759 MLI->getLoopFor(Save) || MLI->getLoopFor(Restore))) {
762 Save = MDT->findNearestCommonDominator(Save, Restore);
767 Restore = MPDT->findNearestCommonDominator(Restore, Save);
770 if (Restore && (MLI->getLoopFor(Save) || MLI->getLoopFor(Restore))) {
771 if (MLI->getLoopDepth(Save) > MLI->getLoopDepth(Restore)) {
772 // Push Save outside of this loop if immediate dominator is different
773 // from save block. If immediate dominator is not different, bail out.
774 Save = FindIDom<>(*Save, Save->predecessors(), *MDT);
775 if (!Save)
831 // are at least at the boundary of the save and restore points. The
857 // Save (resp. restore) point must dominate (resp. post dominate)
861 // save/restore instructions, just give up.
878 assert(!Save && !Restore && "We miss a shrink-wrap opportunity?!");
890 << printMBBReference(*Save) << ' '
891 << printBlockFreq(*MBFI, *Save)
896 if (((IsSaveCheap = EntryFreq >= MBFI->getBlockFreq(Save)) &&
898 ((TargetCanUseSaveAsPrologue = TFI->canUseAsPrologue(*Save)) &&
905 Save = FindIDom<>(*Save, Save->predecessors(), *MDT);
906 if (!Save)
908 NewBB = Save;
917 } while (Save && Restore);
966 << printMBBReference(*Save) << ' '
970 MFI.setSavePoint(Save);