]> git.proxmox.com Git - rustc.git/blame - src/llvm/lib/Target/Hexagon/HexagonFrameLowering.h
Imported Upstream version 1.0.0+dfsg1
[rustc.git] / src / llvm / lib / Target / Hexagon / HexagonFrameLowering.h
CommitLineData
223e47cc
LB
1//=- HexagonFrameLowering.h - Define frame lowering for Hexagon --*- C++ -*--=//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
1a4d82fc
JJ
10#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONFRAMELOWERING_H
11#define LLVM_LIB_TARGET_HEXAGON_HEXAGONFRAMELOWERING_H
223e47cc
LB
12
13#include "Hexagon.h"
223e47cc
LB
14#include "llvm/Target/TargetFrameLowering.h"
15
16namespace llvm {
17
18class HexagonFrameLowering : public TargetFrameLowering {
19private:
223e47cc
LB
20 void determineFrameLayout(MachineFunction &MF) const;
21
22public:
1a4d82fc 23 explicit HexagonFrameLowering() : TargetFrameLowering(StackGrowsDown, 8, 0) {}
223e47cc
LB
24
25 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
26 /// the function.
1a4d82fc
JJ
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;
33
34 void
35 eliminateCallFramePseudoInstr(MachineFunction &MF,
36 MachineBasicBlock &MBB,
37 MachineBasicBlock::iterator I) const override;
38
39 bool
223e47cc
LB
40 restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
41 MachineBasicBlock::iterator MI,
42 const std::vector<CalleeSavedInfo> &CSI,
1a4d82fc
JJ
43 const TargetRegisterInfo *TRI) const override;
44 int getFrameIndexOffset(const MachineFunction &MF, int FI) const override;
45 bool hasFP(const MachineFunction &MF) const override;
223e47cc
LB
46 bool hasTailCall(MachineBasicBlock &MBB) const;
47};
48
49} // End llvm namespace
50
51#endif