Lines Matching refs:MF
33 bool LoongArchFrameLowering::hasFP(const MachineFunction &MF) const { in hasFP()
34 const TargetRegisterInfo *RegInfo = MF.getSubtarget().getRegisterInfo(); in hasFP()
36 const MachineFrameInfo &MFI = MF.getFrameInfo(); in hasFP()
37 return MF.getTarget().Options.DisableFramePointerElim(MF) || in hasFP()
38 RegInfo->hasStackRealignment(MF) || MFI.hasVarSizedObjects() || in hasFP()
42 bool LoongArchFrameLowering::hasBP(const MachineFunction &MF) const { in hasBP()
43 const MachineFrameInfo &MFI = MF.getFrameInfo(); in hasBP()
46 return MFI.hasVarSizedObjects() && TRI->hasStackRealignment(MF); in hasBP()
74 void LoongArchFrameLowering::determineFrameLayout(MachineFunction &MF) const { in determineFrameLayout()
75 MachineFrameInfo &MFI = MF.getFrameInfo(); in determineFrameLayout()
87 void LoongArchFrameLowering::emitPrologue(MachineFunction &MF, in emitPrologue() argument
89 MachineFrameInfo &MFI = MF.getFrameInfo(); in emitPrologue()
102 determineFrameLayout(MF); in emitPrologue()
115 MF.addFrameInst(MCCFIInstruction::cfiDefCfaOffset(nullptr, StackSize)); in emitPrologue()
132 unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset( in emitPrologue()
140 if (hasFP(MF)) { in emitPrologue()
144 unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::cfiDefCfa( in emitPrologue()
152 void LoongArchFrameLowering::emitEpilogue(MachineFunction &MF, in emitEpilogue() argument
155 MachineFrameInfo &MFI = MF.getFrameInfo(); in emitEpilogue()
171 if (RI->hasStackRealignment(MF) || MFI.hasVarSizedObjects()) { in emitEpilogue()
172 assert(hasFP(MF) && "frame pointer should not have been eliminated"); in emitEpilogue()
181 void LoongArchFrameLowering::determineCalleeSaves(MachineFunction &MF, in determineCalleeSaves() argument
184 TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS); in determineCalleeSaves()
187 if (hasFP(MF)) { in determineCalleeSaves()
192 if (hasBP(MF)) in determineCalleeSaves()
197 const MachineFunction &MF, int FI, Register &FrameReg) const { in getFrameIndexReference() argument
198 const MachineFrameInfo &MFI = MF.getFrameInfo(); in getFrameIndexReference()
199 const TargetRegisterInfo *RI = MF.getSubtarget().getRegisterInfo(); in getFrameIndexReference()
216 FrameReg = RI->getFrameRegister(MF); in getFrameIndexReference()
217 if ((FI >= MinCSFI && FI <= MaxCSFI) || !hasFP(MF)) { in getFrameIndexReference()