1 //=- HexagonFrameLowering.h - Define frame lowering for Hexagon --*- C++ -*--=//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONFRAMELOWERING_H
11 #define LLVM_LIB_TARGET_HEXAGON_HEXAGONFRAMELOWERING_H
14 #include "llvm/Target/TargetFrameLowering.h"
18 class HexagonFrameLowering : public TargetFrameLowering {
20 void determineFrameLayout(MachineFunction &MF) const;
23 explicit HexagonFrameLowering() : TargetFrameLowering(StackGrowsDown, 8, 0) {}
25 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
27 void emitPrologue(MachineFunction &MF) const override;
28 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
29 bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
30 MachineBasicBlock::iterator MI,
31 const std::vector<CalleeSavedInfo> &CSI,
32 const TargetRegisterInfo *TRI) const override;
35 eliminateCallFramePseudoInstr(MachineFunction &MF,
36 MachineBasicBlock &MBB,
37 MachineBasicBlock::iterator I) const override;
40 restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
41 MachineBasicBlock::iterator MI,
42 const std::vector<CalleeSavedInfo> &CSI,
43 const TargetRegisterInfo *TRI) const override;
44 int getFrameIndexOffset(const MachineFunction &MF, int FI) const override;
45 bool hasFP(const MachineFunction &MF) const override;
46 bool hasTailCall(MachineBasicBlock &MBB) const;
49 } // End llvm namespace