Path: blob/main/contrib/llvm-project/llvm/lib/Target/SPIRV/SPIRVRegisterInfo.cpp
96353 views
//===-- SPIRVRegisterInfo.cpp - SPIR-V Register Information -----*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file contains the SPIR-V implementation of the TargetRegisterInfo class.9//10//===----------------------------------------------------------------------===//1112#include "SPIRVRegisterInfo.h"13#include "SPIRV.h"14#include "SPIRVSubtarget.h"15#include "llvm/CodeGen/MachineFunction.h"1617#define GET_REGINFO_TARGET_DESC18#include "SPIRVGenRegisterInfo.inc"19using namespace llvm;2021SPIRVRegisterInfo::SPIRVRegisterInfo() : SPIRVGenRegisterInfo(SPIRV::ID0) {}2223BitVector SPIRVRegisterInfo::getReservedRegs(const MachineFunction &MF) const {24return BitVector(getNumRegs());25}2627const MCPhysReg *28SPIRVRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {29static const MCPhysReg CalleeSavedReg = {0};30return &CalleeSavedReg;31}323334