radeon/llvm: Move lowering of SETCC node to R600ISelLowering
[mesa.git] / src / gallium / drivers / radeon / AMDILSubtarget.h
1 //=====-- AMDILSubtarget.h - Define Subtarget for the AMDIL ----*- 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 // This file declares the AMDIL specific subclass of TargetSubtarget.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef _AMDILSUBTARGET_H_
15 #define _AMDILSUBTARGET_H_
16
17 #include "AMDILDevice.h"
18 #include "llvm/ADT/BitVector.h"
19 #include "llvm/Target/TargetSubtargetInfo.h"
20
21 #include <cstdlib>
22 #include <string>
23
24 #define GET_SUBTARGETINFO_HEADER
25 #include "AMDGPUGenSubtargetInfo.inc"
26
27 #define MAX_CB_SIZE (1 << 16)
28 namespace llvm {
29 class Module;
30 class AMDILKernelManager;
31 class AMDILGlobalManager;
32 class AMDILDevice;
33 class AMDILSubtarget : public AMDILGenSubtargetInfo {
34 private:
35 bool CapsOverride[AMDILDeviceInfo::MaxNumberCapabilities];
36 mutable AMDILGlobalManager *mGM;
37 mutable AMDILKernelManager *mKM;
38 const AMDILDevice *mDevice;
39 size_t mDefaultSize[3];
40 size_t mMinimumSize[3];
41 std::string mDevName;
42 uint32_t mVersion;
43 bool mIs64bit;
44 bool mIs32on64bit;
45 bool mDumpCode;
46 public:
47 AMDILSubtarget(llvm::StringRef TT, llvm::StringRef CPU, llvm::StringRef FS);
48 virtual ~AMDILSubtarget();
49 bool isOverride(AMDILDeviceInfo::Caps) const;
50 bool is64bit() const;
51
52 // Helper functions to simplify if statements
53 bool isTargetELF() const;
54 AMDILGlobalManager* getGlobalManager() const;
55 void setGlobalManager(AMDILGlobalManager *gm) const;
56 AMDILKernelManager* getKernelManager() const;
57 void setKernelManager(AMDILKernelManager *gm) const;
58 const AMDILDevice* device() const;
59 std::string getDataLayout() const;
60 std::string getDeviceName() const;
61 virtual size_t getDefaultSize(uint32_t dim) const;
62 // Return the version of CAL that the backend should target.
63 uint32_t calVersion() const;
64 // ParseSubtargetFeatures - Parses features string setting specified
65 // subtarget options. Definition of function is
66 //auto generated by tblgen.
67 void
68 ParseSubtargetFeatures(
69 llvm::StringRef CPU,
70 llvm::StringRef FS);
71 bool dumpCode() const { return mDumpCode; }
72
73 };
74
75 } // end namespace llvm
76
77 #endif // AMDILSUBTARGET_H_