Lines Matching refs:MF

34 void VEFrameLowering::emitPrologueInsns(MachineFunction &MF,
42 *static_cast<const VEInstrInfo *>(MF.getSubtarget().getInstrInfo());
72 void VEFrameLowering::emitEpilogueInsns(MachineFunction &MF,
80 *static_cast<const VEInstrInfo *>(MF.getSubtarget().getInstrInfo());
106 void VEFrameLowering::emitSPAdjustment(MachineFunction &MF,
112 *static_cast<const VEInstrInfo *>(MF.getSubtarget().getInstrInfo());
137 void VEFrameLowering::emitSPExtend(MachineFunction &MF, MachineBasicBlock &MBB,
142 *static_cast<const VEInstrInfo *>(MF.getSubtarget().getInstrInfo());
174 void VEFrameLowering::emitPrologue(MachineFunction &MF,
176 assert(&MF.front() == &MBB && "Shrink-wrapping not yet supported");
177 MachineFrameInfo &MFI = MF.getFrameInfo();
178 const VESubtarget &Subtarget = MF.getSubtarget<VESubtarget>();
187 bool NeedsStackRealignment = RegInfo.needsStackRealignment(MF);
195 report_fatal_error("Function \"" + Twine(MF.getName()) +
215 if (MFI.adjustsStack() && hasReservedCallFrame(MF))
232 emitPrologueInsns(MF, MBB, MBBI, NumBytes, true);
235 emitSPAdjustment(MF, MBB, MBBI, -NumBytes);
238 emitSPExtend(MF, MBB, MBBI, -NumBytes);
244 MF.addFrameInst(MCCFIInstruction::createDefCfaRegister(nullptr, regFP));
249 CFIIndex = MF.addFrameInst(MCCFIInstruction::createWindowSave(nullptr));
255 MachineFunction &MF, MachineBasicBlock &MBB,
257 if (!hasReservedCallFrame(MF)) {
264 emitSPAdjustment(MF, MBB, I, Size);
269 void VEFrameLowering::emitEpilogue(MachineFunction &MF,
273 MachineFrameInfo &MFI = MF.getFrameInfo();
278 emitEpilogueInsns(MF, MBB, MBBI, NumBytes, true);
281 bool VEFrameLowering::hasReservedCallFrame(const MachineFunction &MF) const {
283 return !MF.getFrameInfo().hasVarSizedObjects();
289 bool VEFrameLowering::hasFP(const MachineFunction &MF) const {
290 const TargetRegisterInfo *RegInfo = MF.getSubtarget().getRegisterInfo();
292 const MachineFrameInfo &MFI = MF.getFrameInfo();
293 return MF.getTarget().Options.DisableFramePointerElim(MF) ||
294 RegInfo->needsStackRealignment(MF) || MFI.hasVarSizedObjects() ||
298 int VEFrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
302 int64_t FrameOffset = MF.getFrameInfo().getObjectOffset(FI);
304 return FrameOffset + MF.getFrameInfo().getStackSize();
307 bool VEFrameLowering::isLeafProc(MachineFunction &MF) const {
309 MachineRegisterInfo &MRI = MF.getRegInfo();
310 MachineFrameInfo &MFI = MF.getFrameInfo();
316 && !hasFP(MF); // Don't need %fp
319 void VEFrameLowering::determineCalleeSaves(MachineFunction &MF,
322 TargetFrameLowering::determineCalleeSaves(MF, SavedRegs, RS);
324 assert(isLeafProc(MF) && "TODO implement for non-leaf procs");