Home | History | Annotate | Download | only in AVR
      1 //===-- AVRRegisterInfo.h - AVR 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 AVR implementation of the TargetRegisterInfo class.
     11 //
     12 //===----------------------------------------------------------------------===//
     13 
     14 #ifndef LLVM_AVR_REGISTER_INFO_H
     15 #define LLVM_AVR_REGISTER_INFO_H
     16 
     17 #include "llvm/Target/TargetRegisterInfo.h"
     18 
     19 #define GET_REGINFO_HEADER
     20 #include "AVRGenRegisterInfo.inc"
     21 
     22 namespace llvm {
     23 
     24 /// Utilities relating to AVR registers.
     25 class AVRRegisterInfo : public AVRGenRegisterInfo {
     26 public:
     27   AVRRegisterInfo();
     28 
     29 public:
     30   const uint16_t *
     31   getCalleeSavedRegs(const MachineFunction *MF = 0) const override;
     32   const uint32_t *getCallPreservedMask(const MachineFunction &MF,
     33                                        CallingConv::ID CC) const override;
     34   BitVector getReservedRegs(const MachineFunction &MF) const override;
     35 
     36   const TargetRegisterClass *
     37   getLargestLegalSuperClass(const TargetRegisterClass *RC,
     38                             const MachineFunction &MF) const override;
     39 
     40   /// Stack Frame Processing Methods
     41   void eliminateFrameIndex(MachineBasicBlock::iterator MI, int SPAdj,
     42                            unsigned FIOperandNum,
     43                            RegScavenger *RS = NULL) const override;
     44 
     45   /// Debug information queries.
     46   unsigned getFrameRegister(const MachineFunction &MF) const override;
     47 
     48   /// Returns a TargetRegisterClass used for pointer values.
     49   const TargetRegisterClass *
     50   getPointerRegClass(const MachineFunction &MF,
     51                      unsigned Kind = 0) const override;
     52 };
     53 
     54 } // end namespace llvm
     55 
     56 #endif // LLVM_AVR_REGISTER_INFO_H
     57