Home | History | Annotate | Download | only in Lanai
      1 //===- LanaiRegisterInfo.h - Lanai Register Information Impl ----*- 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 //
     10 // This file contains the Lanai implementation of the TargetRegisterInfo class.
     11 //
     12 //===----------------------------------------------------------------------===//
     13 
     14 #ifndef LLVM_LIB_TARGET_LANAI_LANAIREGISTERINFO_H
     15 #define LLVM_LIB_TARGET_LANAI_LANAIREGISTERINFO_H
     16 
     17 #include "llvm/Target/TargetRegisterInfo.h"
     18 
     19 #define GET_REGINFO_HEADER
     20 #include "LanaiGenRegisterInfo.inc"
     21 
     22 namespace llvm {
     23 
     24 class TargetInstrInfo;
     25 class Type;
     26 
     27 struct LanaiRegisterInfo : public LanaiGenRegisterInfo {
     28   LanaiRegisterInfo();
     29 
     30   const uint32_t *getCallPreservedMask(const MachineFunction &MF,
     31                                        CallingConv::ID) const override;
     32 
     33   // Code Generation virtual methods.
     34   const uint16_t *
     35   getCalleeSavedRegs(const MachineFunction *MF = 0) const override;
     36 
     37   BitVector getReservedRegs(const MachineFunction &MF) const override;
     38 
     39   bool requiresRegisterScavenging(const MachineFunction &MF) const override;
     40 
     41   bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const override;
     42 
     43   void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,
     44                            unsigned FIOperandNum,
     45                            RegScavenger *RS = NULL) const override;
     46 
     47   bool canRealignStack(const MachineFunction &MF) const override;
     48 
     49   // Debug information queries.
     50   unsigned getRARegister() const;
     51   unsigned getFrameRegister(const MachineFunction &MF) const override;
     52   unsigned getBaseRegister() const;
     53   bool hasBasePointer(const MachineFunction &MF) const;
     54 
     55   // Exception handling queries.
     56   unsigned getEHExceptionRegister() const;
     57   unsigned getEHHandlerRegister() const;
     58   int getDwarfRegNum(unsigned RegNum, bool IsEH) const;
     59 };
     60 
     61 } // namespace llvm
     62 
     63 #endif // LLVM_LIB_TARGET_LANAI_LANAIREGISTERINFO_H
     64