mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-08 04:07:07 +00:00
f98f2ce29e
A new backend supporting AMD GPUs: Radeon HD2XXX - HD7XXX git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169915 91177308-0d34-0410-b5e6-96231b3b80d8
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
//===-- SIRegisterInfo.cpp - SI Register Information ---------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
/// \file
|
|
/// \brief SI implementation of the TargetRegisterInfo class.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
#include "SIRegisterInfo.h"
|
|
#include "AMDGPUTargetMachine.h"
|
|
|
|
using namespace llvm;
|
|
|
|
SIRegisterInfo::SIRegisterInfo(AMDGPUTargetMachine &tm,
|
|
const TargetInstrInfo &tii)
|
|
: AMDGPURegisterInfo(tm, tii),
|
|
TM(tm),
|
|
TII(tii)
|
|
{ }
|
|
|
|
BitVector SIRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
|
|
BitVector Reserved(getNumRegs());
|
|
return Reserved;
|
|
}
|
|
|
|
const TargetRegisterClass *
|
|
SIRegisterInfo::getISARegClass(const TargetRegisterClass * rc) const {
|
|
switch (rc->getID()) {
|
|
case AMDGPU::GPRF32RegClassID:
|
|
return &AMDGPU::VReg_32RegClass;
|
|
default: return rc;
|
|
}
|
|
}
|
|
|
|
const TargetRegisterClass * SIRegisterInfo::getCFGStructurizerRegClass(
|
|
MVT VT) const {
|
|
switch(VT.SimpleTy) {
|
|
default:
|
|
case MVT::i32: return &AMDGPU::VReg_32RegClass;
|
|
}
|
|
}
|