LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MipsRegisterInfo.h
Go to the documentation of this file.
1 //===-- MipsRegisterInfo.h - Mips 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 Mips implementation of the TargetRegisterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef MIPSREGISTERINFO_H
15 #define MIPSREGISTERINFO_H
16 
17 #include "Mips.h"
19 
20 #define GET_REGINFO_HEADER
21 #include "MipsGenRegisterInfo.inc"
22 
23 namespace llvm {
24 class MipsSubtarget;
25 class Type;
26 
28 protected:
30 
31 public:
33 
34  /// getRegisterNumbering - Given the enum value for some register, e.g.
35  /// Mips::RA, return the number that it corresponds to (e.g. 31).
36  static unsigned getRegisterNumbering(unsigned RegEnum);
37 
38  /// Get PIC indirect call register
39  static unsigned getPICCallReg();
40 
41  /// Adjust the Mips stack frame.
42  void adjustMipsStackFrame(MachineFunction &MF) const;
43 
44  /// Code Generation virtual methods...
46  unsigned Kind) const;
47 
48  unsigned getRegPressureLimit(const TargetRegisterClass *RC,
49  MachineFunction &MF) const;
50  const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
51  const uint32_t *getCallPreservedMask(CallingConv::ID) const;
52  static const uint32_t *getMips16RetHelperMask();
53 
54  BitVector getReservedRegs(const MachineFunction &MF) const;
55 
56  virtual bool requiresRegisterScavenging(const MachineFunction &MF) const;
57 
58  virtual bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const;
59 
60  /// Stack Frame Processing Methods
62  int SPAdj, unsigned FIOperandNum,
63  RegScavenger *RS = NULL) const;
64 
66  RegScavenger *RS = NULL) const;
67 
68  /// Debug information queries.
69  unsigned getFrameRegister(const MachineFunction &MF) const;
70 
71  /// \brief Return GPR register class.
72  virtual const TargetRegisterClass *intRegClass(unsigned Size) const = 0;
73 
74 private:
75  virtual void eliminateFI(MachineBasicBlock::iterator II, unsigned OpNo,
76  int FrameIndex, uint64_t StackSize,
77  int64_t SPOffset) const = 0;
78 };
79 
80 } // end namespace llvm
81 
82 #endif
COFF::RelocationTypeX86 Type
Definition: COFFYAML.cpp:227
const uint32_t * getCallPreservedMask(CallingConv::ID) const
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=NULL) const
Stack Frame Processing Methods.
static unsigned getRegisterNumbering(unsigned RegEnum)
ID
LLVM Calling Convention Representation.
Definition: CallingConv.h:26
virtual const TargetRegisterClass * intRegClass(unsigned Size) const =0
Return GPR register class.
bundle_iterator< MachineInstr, instr_iterator > iterator
unsigned getRegPressureLimit(const TargetRegisterClass *RC, MachineFunction &MF) const
unsigned getFrameRegister(const MachineFunction &MF) const
Debug information queries.
MipsRegisterInfo(const MipsSubtarget &Subtarget)
static unsigned getPICCallReg()
Get PIC indirect call register.
const MipsSubtarget & Subtarget
void adjustMipsStackFrame(MachineFunction &MF) const
Adjust the Mips stack frame.
virtual bool requiresRegisterScavenging(const MachineFunction &MF) const
virtual bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const
BitVector getReservedRegs(const MachineFunction &MF) const
void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS=NULL) const
static const uint32_t * getMips16RetHelperMask()
const uint16_t * getCalleeSavedRegs(const MachineFunction *MF=0) const
Mips Callee Saved Registers.
const TargetRegisterClass * getPointerRegClass(const MachineFunction &MF, unsigned Kind) const
Code Generation virtual methods...