Lines Matching refs:Save

12 // The safe point for the prologue (resp. epilogue) is called Save
16 // between 2) two executions of the Save (resp. Restore) point there is an
17 // execution of the Restore (resp. Save) point.
21 // Save
25 // Indeed, the execution looks like Save -> Restore -> Save -> Restore ...
28 // Save
35 // Indeed, the execution looks like Save -> Save -> ... -> Restore -> Restore.
55 // For property #1 for Save.
107 MachineBasicBlock *Save;
115 /// Hold the loop information. Used to determine if Save and Restore
134 /// after Save and before Restore.
152 /// \brief Update the Save and Restore points such that \p MBB is in
153 /// the region that is dominated by Save and post-dominated by Restore
154 /// and Save and Restore still match the safe point definition.
155 /// Such point may not exist and Save and/or Restore may be null after
164 Save = nullptr;
179 /// Check whether or not Save and Restore points are still interesting for
181 bool ArePointsInteresting() const { return Save != Entry && Save && Restore; }
275 if (!Save)
276 Save = &MBB;
278 Save = MDT->findNearestCommonDominator(Save, &MBB);
280 if (!Save) {
313 // Make sure Save and Restore are suitable for shrink-wrapping:
314 // 1. all path from Save needs to lead to Restore before exiting.
315 // 2. all path to Restore needs to go through Save from Entry.
317 // A. Save dominates Restore.
318 // B. Restore post-dominates Save.
319 // C. Save and Restore are in the same loop.
322 while (Save && Restore &&
323 (!(SaveDominatesRestore = MDT->dominates(Save, Restore)) ||
324 !(RestorePostDominatesSave = MPDT->dominates(Restore, Save)) ||
329 // Save
335 // All the uses/defs of CSRs are dominated by Save and post-dominated
337 // Restore and before Save are executed.
342 MLI->getLoopFor(Save) || MLI->getLoopFor(Restore))) {
345 Save = MDT->findNearestCommonDominator(Save, Restore);
350 Restore = MPDT->findNearestCommonDominator(Restore, Save);
353 if (Save && Restore &&
354 (MLI->getLoopFor(Save) || MLI->getLoopFor(Restore))) {
355 if (MLI->getLoopDepth(Save) > MLI->getLoopDepth(Restore)) {
356 // Push Save outside of this loop if immediate dominator is different
358 Save = FindIDom<>(*Save, Save->predecessors(), *MDT);
359 if (!Save)
458 // Save (resp. restore) point must dominate (resp. post dominate)
476 assert(!Save && !Restore && "We miss a shrink-wrap opportunity?!");
487 << Save->getNumber() << ' ' << Save->getName() << ' '
488 << MBFI->getBlockFreq(Save).getFrequency() << "\nRestore: "
493 if (((IsSaveCheap = EntryFreq >= MBFI->getBlockFreq(Save).getFrequency()) &&
495 ((TargetCanUseSaveAsPrologue = TFI->canUseAsPrologue(*Save)) &&
501 Save = FindIDom<>(*Save, Save->predecessors(), *MDT);
502 if (!Save)
504 NewBB = Save;
513 } while (Save && Restore);
520 DEBUG(dbgs() << "Final shrink wrap candidates:\nSave: " << Save->getNumber()
521 << ' ' << Save->getName() << "\nRestore: "
525 MFI->setSavePoint(Save);