diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-06-07 20:37:48 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-06-07 20:37:48 +0000 |
commit | 3ff0abfaabc2c7f604d490be587b9c27e7c91ac0 (patch) | |
tree | 159b1d39952b6a6af115ed1ee8e4946200c89bbf /lib/Target/R600/AMDGPUSubtarget.h | |
parent | c1dcb8d654d4468d63224269ee3c92480bf2385b (diff) | |
download | llvm-3ff0abfaabc2c7f604d490be587b9c27e7c91ac0.tar.gz llvm-3ff0abfaabc2c7f604d490be587b9c27e7c91ac0.tar.bz2 llvm-3ff0abfaabc2c7f604d490be587b9c27e7c91ac0.tar.xz |
R600: Rework subtarget info and remove AMDILDevice classes
This should simplify the subtarget definitions and make it easier to
add new ones.
Reviewed-by: Vincent Lejeune <vljn@ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/AMDGPUSubtarget.h')
-rw-r--r-- | lib/Target/R600/AMDGPUSubtarget.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/Target/R600/AMDGPUSubtarget.h b/lib/Target/R600/AMDGPUSubtarget.h index b9531bdcf5..8c65096552 100644 --- a/lib/Target/R600/AMDGPUSubtarget.h +++ b/lib/Target/R600/AMDGPUSubtarget.h @@ -14,7 +14,7 @@ #ifndef AMDGPUSUBTARGET_H #define AMDGPUSUBTARGET_H -#include "AMDILDevice.h" +#include "AMDGPU.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Target/TargetSubtargetInfo.h" @@ -27,9 +27,16 @@ namespace llvm { class AMDGPUSubtarget : public AMDGPUGenSubtargetInfo { +public: + enum Generation { + R600 = 0, + R700, + EVERGREEN, + NORTHERN_ISLANDS, + SOUTHERN_ISLANDS + }; + private: - bool CapsOverride[AMDGPUDeviceInfo::MaxNumberCapabilities]; - const AMDGPUDevice *Device; size_t DefaultSize[3]; std::string DevName; bool Is64bit; @@ -38,24 +45,27 @@ private: bool R600ALUInst; bool HasVertexCache; short TexVTXClauseSize; + enum Generation Gen; + bool FP64; + bool CaymanISA; InstrItineraryData InstrItins; public: AMDGPUSubtarget(StringRef TT, StringRef CPU, StringRef FS); - virtual ~AMDGPUSubtarget(); const InstrItineraryData &getInstrItineraryData() const { return InstrItins; } virtual void ParseSubtargetFeatures(StringRef CPU, StringRef FS); - bool isOverride(AMDGPUDeviceInfo::Caps) const; bool is64bit() const; bool hasVertexCache() const; short getTexVTXClauseSize() const; + enum Generation getGeneration() const; + bool hasHWFP64() const; + bool hasCaymanISA() const; // Helper functions to simplify if statements bool isTargetELF() const; - const AMDGPUDevice* device() const; std::string getDataLayout() const; std::string getDeviceName() const; virtual size_t getDefaultSize(uint32_t dim) const; |