blob: 24a640845eab49bbc769f5fd36fca7469136a2d6 [file] [log] [blame]
Tom Stellardf98f2ce2012-12-11 21:25:42 +00001//===------- AMDILNIDevice.h - Define NI Device for 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/// \file
10/// \brief Interface for the subtarget data classes.
11///
12/// This file will define the interface that each generation needs to
13/// implement in order to correctly answer queries on the capabilities of the
14/// specific hardware.
15//===---------------------------------------------------------------------===//
16#ifndef AMDILNIDEVICE_H
17#define AMDILNIDEVICE_H
Tom Stellardf98f2ce2012-12-11 21:25:42 +000018#include "AMDGPUSubtarget.h"
Chandler Carruth58a2cbe2013-01-02 10:22:59 +000019#include "AMDILEvergreenDevice.h"
Tom Stellardf98f2ce2012-12-11 21:25:42 +000020
21namespace llvm {
22
23class AMDGPUSubtarget;
24//===---------------------------------------------------------------------===//
25// NI generation of devices and their respective sub classes
26//===---------------------------------------------------------------------===//
27
28/// \brief The AMDGPUNIDevice is the base class for all Northern Island series of
29/// cards.
30///
31/// It is very similiar to the AMDGPUEvergreenDevice, with the major
32/// exception being differences in wavefront size and hardware capabilities. The
33/// NI devices are all 64 wide wavefronts and also add support for signed 24 bit
34/// integer operations
35class AMDGPUNIDevice : public AMDGPUEvergreenDevice {
36public:
37 AMDGPUNIDevice(AMDGPUSubtarget*);
38 virtual ~AMDGPUNIDevice();
39 virtual size_t getMaxLDSSize() const;
40 virtual uint32_t getGeneration() const;
41};
42
43/// Just as the AMDGPUCypressDevice is the double capable version of the
44/// AMDGPUEvergreenDevice, the AMDGPUCaymanDevice is the double capable version
45/// of the AMDGPUNIDevice. The other major difference is that the Cayman Device
46/// has 4 wide ALU's, whereas the rest of the NI family is a 5 wide.
47class AMDGPUCaymanDevice: public AMDGPUNIDevice {
48public:
49 AMDGPUCaymanDevice(AMDGPUSubtarget*);
50 virtual ~AMDGPUCaymanDevice();
51private:
52 virtual void setCaps();
53};
54
55static const unsigned int MAX_LDS_SIZE_900 = AMDGPUDevice::MAX_LDS_SIZE_800;
56} // namespace llvm
57#endif // AMDILNIDEVICE_H