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