Lines Matching refs:MFI
224 MachineFrameInfo *MFI = Fn.getFrameInfo(); in runOnMachineFunction() local
225 uint64_t StackSize = MFI->getStackSize(); in runOnMachineFunction()
234 MFI->setSavePoint(nullptr); in runOnMachineFunction()
235 MFI->setRestorePoint(nullptr); in runOnMachineFunction()
245 MachineFrameInfo *MFI = Fn.getFrameInfo(); in calculateCallFrameInfo() local
248 bool AdjustsStack = MFI->adjustsStack(); in calculateCallFrameInfo()
277 MFI->setAdjustsStack(AdjustsStack); in calculateCallFrameInfo()
278 MFI->setMaxCallFrameSize(MaxCallFrameSize); in calculateCallFrameInfo()
296 const MachineFrameInfo *MFI = Fn.getFrameInfo(); in calculateSaveRestoreBlocks() local
303 if (MFI->getSavePoint()) { in calculateSaveRestoreBlocks()
304 SaveBlocks.push_back(MFI->getSavePoint()); in calculateSaveRestoreBlocks()
305 assert(MFI->getRestorePoint() && "Both restore and save must be set"); in calculateSaveRestoreBlocks()
306 MachineBasicBlock *RestoreBlock = MFI->getRestorePoint(); in calculateSaveRestoreBlocks()
343 MachineFrameInfo *MFI = F.getFrameInfo(); in assignCalleeSavedSpillSlots() local
382 FrameIdx = MFI->CreateStackObject(RC->getSize(), Align, true); in assignCalleeSavedSpillSlots()
388 MFI->CreateFixedSpillStackObject(RC->getSize(), FixedSlot->Offset); in assignCalleeSavedSpillSlots()
395 MFI->setCalleeSavedInfo(CSI); in assignCalleeSavedSpillSlots()
401 MachineFrameInfo *MFI = MF.getFrameInfo(); in updateLiveness() local
412 MachineBasicBlock *Save = MFI->getSavePoint(); in updateLiveness()
423 MachineBasicBlock *Restore = MFI->getRestorePoint(); in updateLiveness()
443 const std::vector<CalleeSavedInfo> &CSI = MFI->getCalleeSavedInfo(); in updateLiveness()
463 MachineFrameInfo *MFI = Fn.getFrameInfo(); in insertCSRSpillsAndRestores() local
464 const std::vector<CalleeSavedInfo> &CSI = MFI->getCalleeSavedInfo(); in insertCSRSpillsAndRestores()
466 MFI->setCalleeSavedInfoValid(true); in insertCSRSpillsAndRestores()
554 AdjustStackOffset(MachineFrameInfo *MFI, int FrameIdx, in AdjustStackOffset() argument
559 Offset += MFI->getObjectSize(FrameIdx); in AdjustStackOffset()
561 unsigned Align = MFI->getObjectAlignment(FrameIdx); in AdjustStackOffset()
572 MFI->setObjectOffset(FrameIdx, -Offset); // Set the computed offset in AdjustStackOffset()
575 MFI->setObjectOffset(FrameIdx, Offset); in AdjustStackOffset()
576 Offset += MFI->getObjectSize(FrameIdx); in AdjustStackOffset()
584 computeFreeStackSlots(MachineFrameInfo *MFI, bool StackGrowsDown, in computeFreeStackSlots() argument
595 for (int i = MFI->getObjectIndexBegin(); i != 0; ++i) in computeFreeStackSlots()
604 int ObjOffset = MFI->getObjectOffset(i); in computeFreeStackSlots()
605 int ObjSize = MFI->getObjectSize(i); in computeFreeStackSlots()
624 static inline bool scavengeStackSlot(MachineFrameInfo *MFI, int FrameIdx, in scavengeStackSlot() argument
627 if (MFI->isVariableSizedObjectIndex(FrameIdx)) in scavengeStackSlot()
637 unsigned ObjAlign = MFI->getObjectAlignment(FrameIdx); in scavengeStackSlot()
641 int64_t ObjSize = MFI->getObjectSize(FrameIdx); in scavengeStackSlot()
671 MFI->setObjectOffset(FrameIdx, ObjStart); in scavengeStackSlot()
675 MFI->setObjectOffset(FrameIdx, FreeStart); in scavengeStackSlot()
687 MachineFrameInfo *MFI, bool StackGrowsDown, in AssignProtectedObjSet() argument
693 AdjustStackOffset(MFI, i, StackGrowsDown, Offset, MaxAlign, Skew); in AssignProtectedObjSet()
709 MachineFrameInfo *MFI = Fn.getFrameInfo(); in calculateFrameObjectOffsets() local
728 for (int i = MFI->getObjectIndexBegin(); i != 0; ++i) { in calculateFrameObjectOffsets()
734 FixedOff = -MFI->getObjectOffset(i); in calculateFrameObjectOffsets()
738 FixedOff = MFI->getObjectOffset(i) + MFI->getObjectSize(i); in calculateFrameObjectOffsets()
749 Offset += MFI->getObjectSize(i); in calculateFrameObjectOffsets()
751 unsigned Align = MFI->getObjectAlignment(i); in calculateFrameObjectOffsets()
756 MFI->setObjectOffset(i, -Offset); // Set the computed offset in calculateFrameObjectOffsets()
761 unsigned Align = MFI->getObjectAlignment(i); in calculateFrameObjectOffsets()
766 MFI->setObjectOffset(i, Offset); in calculateFrameObjectOffsets()
767 Offset += MFI->getObjectSize(i); in calculateFrameObjectOffsets()
774 unsigned MaxAlign = MFI->getMaxAlignment(); in calculateFrameObjectOffsets()
789 AdjustStackOffset(MFI, *I, StackGrowsDown, Offset, MaxAlign, Skew); in calculateFrameObjectOffsets()
796 if (MFI->getUseLocalStackAllocationBlock()) { in calculateFrameObjectOffsets()
797 unsigned Align = MFI->getLocalFrameMaxAlign(); in calculateFrameObjectOffsets()
805 for (unsigned i = 0, e = MFI->getLocalFrameObjectCount(); i != e; ++i) { in calculateFrameObjectOffsets()
806 std::pair<int, int64_t> Entry = MFI->getLocalFrameObjectMap(i); in calculateFrameObjectOffsets()
810 MFI->setObjectOffset(Entry.first, FIOffset); in calculateFrameObjectOffsets()
813 Offset += MFI->getLocalFrameSize(); in calculateFrameObjectOffsets()
826 if (MFI->getStackProtectorIndex() >= 0) { in calculateFrameObjectOffsets()
831 AdjustStackOffset(MFI, MFI->getStackProtectorIndex(), StackGrowsDown, in calculateFrameObjectOffsets()
835 for (unsigned i = 0, e = MFI->getObjectIndexEnd(); i != e; ++i) { in calculateFrameObjectOffsets()
836 if (MFI->isObjectPreAllocated(i) && in calculateFrameObjectOffsets()
837 MFI->getUseLocalStackAllocationBlock()) in calculateFrameObjectOffsets()
843 if (MFI->isDeadObjectIndex(i)) in calculateFrameObjectOffsets()
845 if (MFI->getStackProtectorIndex() == (int)i || in calculateFrameObjectOffsets()
849 switch (SP->getSSPLayout(MFI->getObjectAllocation(i))) { in calculateFrameObjectOffsets()
865 AssignProtectedObjSet(LargeArrayObjs, ProtectedObjs, MFI, StackGrowsDown, in calculateFrameObjectOffsets()
867 AssignProtectedObjSet(SmallArrayObjs, ProtectedObjs, MFI, StackGrowsDown, in calculateFrameObjectOffsets()
869 AssignProtectedObjSet(AddrOfObjs, ProtectedObjs, MFI, StackGrowsDown, in calculateFrameObjectOffsets()
877 for (unsigned i = 0, e = MFI->getObjectIndexEnd(); i != e; ++i) { in calculateFrameObjectOffsets()
878 if (MFI->isObjectPreAllocated(i) && in calculateFrameObjectOffsets()
879 MFI->getUseLocalStackAllocationBlock()) in calculateFrameObjectOffsets()
885 if (MFI->isDeadObjectIndex(i)) in calculateFrameObjectOffsets()
887 if (MFI->getStackProtectorIndex() == (int)i || in calculateFrameObjectOffsets()
899 AdjustStackOffset(MFI, EHRegNodeFrameIndex, StackGrowsDown, Offset, in calculateFrameObjectOffsets()
914 MFI->getStackProtectorIndex() < 0 && TFI.enableStackSlotScavenging(Fn)) in calculateFrameObjectOffsets()
915 computeFreeStackSlots(MFI, StackGrowsDown, MinCSFrameIndex, MaxCSFrameIndex, in calculateFrameObjectOffsets()
920 if (!scavengeStackSlot(MFI, Object, StackGrowsDown, MaxAlign, in calculateFrameObjectOffsets()
922 AdjustStackOffset(MFI, Object, StackGrowsDown, Offset, MaxAlign, Skew); in calculateFrameObjectOffsets()
931 AdjustStackOffset(MFI, *I, StackGrowsDown, Offset, MaxAlign, Skew); in calculateFrameObjectOffsets()
938 if (MFI->adjustsStack() && TFI.hasReservedCallFrame(Fn)) in calculateFrameObjectOffsets()
939 Offset += MFI->getMaxCallFrameSize(); in calculateFrameObjectOffsets()
947 if (MFI->adjustsStack() || MFI->hasVarSizedObjects() || in calculateFrameObjectOffsets()
948 (RegInfo->needsStackRealignment(Fn) && MFI->getObjectIndexEnd() != 0)) in calculateFrameObjectOffsets()
961 MFI->setStackSize(StackSize); in calculateFrameObjectOffsets()