2011-12-12 21:14:40 +00:00
|
|
|
//=- HexagonFrameLowering.h - Define frame lowering for Hexagon --*- C++ -*--=//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONFRAMELOWERING_H
|
|
|
|
#define LLVM_LIB_TARGET_HEXAGON_HEXAGONFRAMELOWERING_H
|
2011-12-12 21:14:40 +00:00
|
|
|
|
|
|
|
#include "Hexagon.h"
|
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class HexagonFrameLowering : public TargetFrameLowering {
|
|
|
|
private:
|
|
|
|
void determineFrameLayout(MachineFunction &MF) const;
|
|
|
|
|
|
|
|
public:
|
2014-06-27 00:13:47 +00:00
|
|
|
explicit HexagonFrameLowering() : TargetFrameLowering(StackGrowsDown, 8, 0) {}
|
2011-12-12 21:14:40 +00:00
|
|
|
|
|
|
|
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
|
|
|
/// the function.
|
2014-04-29 07:58:16 +00:00
|
|
|
void emitPrologue(MachineFunction &MF) const override;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
|
|
|
|
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
const std::vector<CalleeSavedInfo> &CSI,
|
|
|
|
const TargetRegisterInfo *TRI) const override;
|
|
|
|
|
|
|
|
void
|
|
|
|
eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I) const override;
|
|
|
|
|
|
|
|
bool
|
2011-12-12 21:14:40 +00:00
|
|
|
restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
const std::vector<CalleeSavedInfo> &CSI,
|
2014-04-29 07:58:16 +00:00
|
|
|
const TargetRegisterInfo *TRI) const override;
|
|
|
|
int getFrameIndexOffset(const MachineFunction &MF, int FI) const override;
|
|
|
|
bool hasFP(const MachineFunction &MF) const override;
|
2011-12-12 21:14:40 +00:00
|
|
|
bool hasTailCall(MachineBasicBlock &MBB) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|