LLVM API Documentation

HexagonFrameLowering.h
Go to the documentation of this file.
00001 //=- HexagonFrameLowering.h - Define frame lowering for Hexagon --*- C++ -*--=//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONFRAMELOWERING_H
00011 #define LLVM_LIB_TARGET_HEXAGON_HEXAGONFRAMELOWERING_H
00012 
00013 #include "Hexagon.h"
00014 #include "llvm/Target/TargetFrameLowering.h"
00015 
00016 namespace llvm {
00017 
00018 class HexagonFrameLowering : public TargetFrameLowering {
00019 private:
00020   void determineFrameLayout(MachineFunction &MF) const;
00021 
00022 public:
00023   explicit HexagonFrameLowering() : TargetFrameLowering(StackGrowsDown, 8, 0) {}
00024 
00025   /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
00026   /// the function.
00027   void emitPrologue(MachineFunction &MF) const override;
00028   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
00029   bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
00030                                  MachineBasicBlock::iterator MI,
00031                                  const std::vector<CalleeSavedInfo> &CSI,
00032                                  const TargetRegisterInfo *TRI) const override;
00033 
00034   void
00035   eliminateCallFramePseudoInstr(MachineFunction &MF,
00036                                 MachineBasicBlock &MBB,
00037                                 MachineBasicBlock::iterator I) const override;
00038 
00039   bool
00040   restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
00041                               MachineBasicBlock::iterator MI,
00042                               const std::vector<CalleeSavedInfo> &CSI,
00043                               const TargetRegisterInfo *TRI) const override;
00044   int getFrameIndexOffset(const MachineFunction &MF, int FI) const override;
00045   bool hasFP(const MachineFunction &MF) const override;
00046   bool hasTailCall(MachineBasicBlock &MBB) const;
00047 };
00048 
00049 } // End llvm namespace
00050 
00051 #endif