R600/SI: Remove unused SGPR spilling code
[oota-llvm.git] / lib / Target / R600 / SIMachineFunctionInfo.h
1 //===- SIMachineFunctionInfo.h - SIMachineFunctionInfo interface -*- C++ -*-==//
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 //
12 //===----------------------------------------------------------------------===//
13
14
15 #ifndef LLVM_LIB_TARGET_R600_SIMACHINEFUNCTIONINFO_H
16 #define LLVM_LIB_TARGET_R600_SIMACHINEFUNCTIONINFO_H
17
18 #include "AMDGPUMachineFunction.h"
19 #include <map>
20
21 namespace llvm {
22
23 class MachineRegisterInfo;
24
25 /// This class keeps track of the SPI_SP_INPUT_ADDR config register, which
26 /// tells the hardware which interpolation parameters to load.
27 class SIMachineFunctionInfo : public AMDGPUMachineFunction {
28   void anchor() override;
29 public:
30
31   struct SpilledReg {
32     unsigned VGPR;
33     int Lane;
34     SpilledReg(unsigned R, int L) : VGPR (R), Lane (L) { }
35     SpilledReg() : VGPR(0), Lane(-1) { }
36     bool hasLane() { return Lane != -1;}
37   };
38
39   // SIMachineFunctionInfo definition
40
41   SIMachineFunctionInfo(const MachineFunction &MF);
42   SpilledReg getSpilledReg(MachineFunction *MF, unsigned FrameIndex,
43                            unsigned SubIdx);
44   unsigned PSInputAddr;
45   unsigned NumUserSGPRs;
46   std::map<unsigned, unsigned> LaneVGPRs;
47 };
48
49 } // End namespace llvm
50
51
52 #endif