LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HexagonRegisterInfo.h
Go to the documentation of this file.
1 //==- HexagonRegisterInfo.h - Hexagon 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 Hexagon implementation of the TargetRegisterInfo
11 // class.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef HexagonREGISTERINFO_H
16 #define HexagonREGISTERINFO_H
17 
20 
21 #define GET_REGINFO_HEADER
22 #include "HexagonGenRegisterInfo.inc"
23 
24 //
25 // We try not to hard code the reserved registers in our code,
26 // so the following two macros were defined. However, there
27 // are still a few places that R11 and R10 are hard wired.
28 // See below. If, in the future, we decided to change the reserved
29 // register. Don't forget changing the following places.
30 //
31 // 1. the "Defs" set of STriw_pred in HexagonInstrInfo.td
32 // 2. the "Defs" set of LDri_pred in HexagonInstrInfo.td
33 // 3. the definition of "IntRegs" in HexagonRegisterInfo.td
34 // 4. the definition of "DoubleRegs" in HexagonRegisterInfo.td
35 //
36 #define HEXAGON_RESERVED_REG_1 Hexagon::R10
37 #define HEXAGON_RESERVED_REG_2 Hexagon::R11
38 
39 namespace llvm {
40 
41 class HexagonSubtarget;
42 class HexagonInstrInfo;
43 class Type;
44 
47 
49 
50  /// Code Generation virtual methods...
51  const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
52 
54  const MachineFunction *MF = 0) const;
55 
56  BitVector getReservedRegs(const MachineFunction &MF) const;
57 
59  int SPAdj, unsigned FIOperandNum,
60  RegScavenger *RS = NULL) const;
61 
62  /// determineFrameLayout - Determine the size of the frame and maximum call
63  /// frame size.
64  void determineFrameLayout(MachineFunction &MF) const;
65 
66  /// requiresRegisterScavenging - returns true since we may need scavenging for
67  /// a temporary register when generating hardware loop instructions.
69  return true;
70  }
71 
73  return true;
74  }
75 
76  // Debug information queries.
77  unsigned getRARegister() const;
78  unsigned getFrameRegister(const MachineFunction &MF) const;
79  unsigned getFrameRegister() const;
80  unsigned getStackRegister() const;
81 };
82 
83 } // end namespace llvm
84 
85 #endif
COFF::RelocationTypeX86 Type
Definition: COFFYAML.cpp:227
const TargetRegisterClass *const * getCalleeSavedRegClasses(const MachineFunction *MF=0) const
BitVector getReservedRegs(const MachineFunction &MF) const
bundle_iterator< MachineInstr, instr_iterator > iterator
HexagonRegisterInfo(HexagonSubtarget &st)
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=NULL) const
void determineFrameLayout(MachineFunction &MF) const
bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const
bool requiresRegisterScavenging(const MachineFunction &MF) const
HexagonSubtarget & Subtarget
const uint16_t * getCalleeSavedRegs(const MachineFunction *MF=0) const
Code Generation virtual methods...