Add R600 backend
[oota-llvm.git] / lib / Target / R600 / AMDGPURegisterInfo.cpp
1 //===-- AMDGPURegisterInfo.cpp - AMDGPU 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 /// \file
11 /// \brief Parent TargetRegisterInfo class common to all hw codegen targets.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #include "AMDGPURegisterInfo.h"
16 #include "AMDGPUTargetMachine.h"
17
18 using namespace llvm;
19
20 AMDGPURegisterInfo::AMDGPURegisterInfo(TargetMachine &tm,
21     const TargetInstrInfo &tii)
22 : AMDGPUGenRegisterInfo(0),
23   TM(tm),
24   TII(tii)
25   { }
26
27 //===----------------------------------------------------------------------===//
28 // Function handling callbacks - Functions are a seldom used feature of GPUS, so
29 // they are not supported at this time.
30 //===----------------------------------------------------------------------===//
31
32 const uint16_t AMDGPURegisterInfo::CalleeSavedReg = AMDGPU::NoRegister;
33
34 const uint16_t* AMDGPURegisterInfo::getCalleeSavedRegs(const MachineFunction *MF)
35                                                                          const {
36   return &CalleeSavedReg;
37 }
38
39 void AMDGPURegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
40                                              int SPAdj,
41                                              RegScavenger *RS) const {
42   assert(!"Subroutines not supported yet");
43 }
44
45 unsigned AMDGPURegisterInfo::getFrameRegister(const MachineFunction &MF) const {
46   assert(!"Subroutines not supported yet");
47   return 0;
48 }
49
50 #define GET_REGINFO_TARGET_DESC
51 #include "AMDGPUGenRegisterInfo.inc"