LLVM
22.0.0git
lib
Target
SPIRV
SPIRVRegisterInfo.cpp
Go to the documentation of this file.
1
//===-- SPIRVRegisterInfo.cpp - SPIR-V Register Information -----*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file contains the SPIR-V implementation of the TargetRegisterInfo class.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "
SPIRVRegisterInfo.h
"
14
#include "
SPIRVSubtarget.h
"
15
#include "
llvm/CodeGen/MachineFunction.h
"
16
17
#define GET_REGINFO_TARGET_DESC
18
#include "SPIRVGenRegisterInfo.inc"
19
using namespace
llvm
;
20
21
SPIRVRegisterInfo::SPIRVRegisterInfo
() :
SPIRVGenRegisterInfo
(
SPIRV
::ID0) {}
22
23
BitVector
SPIRVRegisterInfo::getReservedRegs
(
const
MachineFunction
&MF)
const
{
24
return
BitVector
(getNumRegs());
25
}
26
27
const
MCPhysReg
*
28
SPIRVRegisterInfo::getCalleeSavedRegs
(
const
MachineFunction
*MF)
const
{
29
static
const
MCPhysReg
CalleeSavedReg
= {0};
30
return
&
CalleeSavedReg
;
31
}
MachineFunction.h
CalleeSavedReg
static const MCPhysReg CalleeSavedReg
Definition
R600RegisterInfo.cpp:66
SPIRVRegisterInfo.h
SPIRVSubtarget.h
SPIRVGenRegisterInfo
llvm::BitVector
Definition
BitVector.h:82
llvm::MachineFunction
Definition
MachineFunction.h:286
llvm::SPIRV
Definition
SPIRVConvergenceRegionAnalysis.h:31
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
llvm::MCPhysReg
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
Definition
MCRegister.h:21
llvm::SPIRVRegisterInfo::getCalleeSavedRegs
const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const override
Definition
SPIRVRegisterInfo.cpp:28
llvm::SPIRVRegisterInfo::SPIRVRegisterInfo
SPIRVRegisterInfo()
Definition
SPIRVRegisterInfo.cpp:21
llvm::SPIRVRegisterInfo::getReservedRegs
BitVector getReservedRegs(const MachineFunction &MF) const override
Definition
SPIRVRegisterInfo.cpp:23
Generated on
for LLVM by
1.14.0