| //===- XtensaFrameLowering.cpp - Xtensa Frame Information -----------------===// |
| // |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| // |
| //===----------------------------------------------------------------------===// |
| // |
| // This file contains the Xtensa implementation of TargetFrameLowering class. |
| // |
| //===----------------------------------------------------------------------===// |
| |
| #include "XtensaFrameLowering.h" |
| #include "XtensaInstrInfo.h" |
| #include "XtensaSubtarget.h" |
| #include "llvm/CodeGen/MachineFrameInfo.h" |
| #include "llvm/CodeGen/MachineInstrBuilder.h" |
| #include "llvm/CodeGen/MachineModuleInfo.h" |
| #include "llvm/CodeGen/MachineRegisterInfo.h" |
| #include "llvm/CodeGen/RegisterScavenging.h" |
| #include "llvm/IR/Function.h" |
| |
| using namespace llvm; |
| |
| XtensaFrameLowering::XtensaFrameLowering() |
| : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, Align(4), 0, |
| Align(4)) {} |
| |
| bool XtensaFrameLowering::hasFP(const MachineFunction &MF) const { |
| const MachineFrameInfo &MFI = MF.getFrameInfo(); |
| return MF.getTarget().Options.DisableFramePointerElim(MF) || |
| MFI.hasVarSizedObjects(); |
| } |
| |
| void XtensaFrameLowering::emitPrologue(MachineFunction &MF, |
| MachineBasicBlock &MBB) const {} |
| |
| void XtensaFrameLowering::emitEpilogue(MachineFunction &MF, |
| MachineBasicBlock &MBB) const {} |