brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · f0095b8 Raw
60 lines · c
1//===- XtensaFrameLowering.h - Define frame lowering for Xtensa --*- C++ -*-==//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===-----------------------------------------------------------------------==//8 9#ifndef LLVM_LIB_TARGET_XTENSA_XTENSAFRAMELOWERING_H10#define LLVM_LIB_TARGET_XTENSA_XTENSAFRAMELOWERING_H11 12#include "llvm/CodeGen/TargetFrameLowering.h"13 14namespace llvm {15class XtensaTargetMachine;16class XtensaSubtarget;17class XtensaInstrInfo;18class XtensaRegisterInfo;19 20class XtensaFrameLowering : public TargetFrameLowering {21  const XtensaSubtarget &STI;22  const XtensaInstrInfo &TII;23  const XtensaRegisterInfo *TRI;24 25public:26  XtensaFrameLowering(const XtensaSubtarget &STI);27 28  /// emitProlog/emitEpilog - These methods insert prolog and epilog code into29  /// the function.30  void emitPrologue(MachineFunction &, MachineBasicBlock &) const override;31  void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;32 33  MachineBasicBlock::iterator34  eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,35                                MachineBasicBlock::iterator I) const override;36 37  bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,38                                 MachineBasicBlock::iterator MI,39                                 ArrayRef<CalleeSavedInfo> CSI,40                                 const TargetRegisterInfo *TRI) const override;41  bool42  restoreCalleeSavedRegisters(MachineBasicBlock &MBB,43                              MachineBasicBlock::iterator MI,44                              MutableArrayRef<CalleeSavedInfo> CSI,45                              const TargetRegisterInfo *TRI) const override;46 47  void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,48                            RegScavenger *RS) const override;49 50  void processFunctionBeforeFrameFinalized(MachineFunction &MF,51                                           RegScavenger *RS) const override;52 53protected:54  bool hasFPImpl(const MachineFunction &MF) const override;55};56 57} // namespace llvm58 59#endif /* LLVM_LIB_TARGET_XTENSA_XTENSAFRAMELOWERING_H */60