LLVM  7.0.0
Nios2RegisterInfo.cpp
Go to the documentation of this file.
1 //===-- Nios2RegisterInfo.cpp - Nios2 Register Information -== ------------===//
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 Nios2 implementation of the TargetRegisterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #define DEBUG_TYPE "nios2-reg-info"
15 
16 #include "Nios2RegisterInfo.h"
17 
18 #include "Nios2.h"
19 #include "Nios2Subtarget.h"
20 
21 #define GET_REGINFO_TARGET_DESC
22 #include "Nios2GenRegisterInfo.inc"
23 
24 using namespace llvm;
25 
27  : Nios2GenRegisterInfo(Nios2::RA), Subtarget(ST) {}
28 
30  return &Nios2::CPURegsRegClass;
31 }
32 
33 const MCPhysReg *
35  return CSR_SaveList;
36 }
37 
39  static const MCPhysReg ReservedCPURegs[] = {Nios2::ZERO, Nios2::AT, Nios2::SP,
40  Nios2::RA, Nios2::PC, Nios2::GP};
41  BitVector Reserved(getNumRegs());
42 
43  for (unsigned I = 0; I < array_lengthof(ReservedCPURegs); ++I)
44  Reserved.set(ReservedCPURegs[I]);
45 
46  return Reserved;
47 }
48 
50  int SPAdj, unsigned FIOperandNum,
51  RegScavenger *RS) const {}
52 
54  return Nios2::SP;
55 }
BitVector & set()
Definition: BitVector.h:398
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
Stack Frame Processing Methods.
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
const TargetRegisterClass * intRegClass(unsigned Size) const
Return GPR register class.
SI optimize exec mask operations pre RA
Nios2RegisterInfo(const Nios2Subtarget &Subtarget)
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
unsigned getFrameRegister(const MachineFunction &MF) const override
Debug information queries.
BitVector getReservedRegs(const MachineFunction &MF) const override
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
Definition: STLExtras.h:800
#define I(x, y, z)
Definition: MD5.cpp:58
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.