blob: ea90f774a856d1c4887f8d59a4d30e1d8c1b7da3 [file] [log] [blame]
Tom Stellardf98f2ce2012-12-11 21:25:42 +00001//==- AMDILEvergreenDevice.h - Define Evergreen 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//
10/// \file
11/// \brief Interface for the subtarget data classes.
12///
13/// This file will define the interface that each generation needs to
14/// implement in order to correctly answer queries on the capabilities of the
15/// specific hardware.
16//===----------------------------------------------------------------------===//
17#ifndef AMDILEVERGREENDEVICE_H
18#define AMDILEVERGREENDEVICE_H
Tom Stellardf98f2ce2012-12-11 21:25:42 +000019#include "AMDGPUSubtarget.h"
Chandler Carruth58a2cbe2013-01-02 10:22:59 +000020#include "AMDILDevice.h"
Tom Stellardf98f2ce2012-12-11 21:25:42 +000021
22namespace llvm {
23 class AMDGPUSubtarget;
24//===----------------------------------------------------------------------===//
25// Evergreen generation of devices and their respective sub classes
26//===----------------------------------------------------------------------===//
27
28
29/// \brief The AMDGPUEvergreenDevice is the base device class for all of the Evergreen
30/// series of cards.
31///
32/// This class contains information required to differentiate
33/// the Evergreen device from the generic AMDGPUDevice. This device represents
34/// that capabilities of the 'Juniper' cards, also known as the HD57XX.
35class AMDGPUEvergreenDevice : public AMDGPUDevice {
36public:
37 AMDGPUEvergreenDevice(AMDGPUSubtarget *ST);
38 virtual ~AMDGPUEvergreenDevice();
39 virtual size_t getMaxLDSSize() const;
40 virtual size_t getMaxGDSSize() const;
41 virtual size_t getWavefrontSize() const;
42 virtual uint32_t getGeneration() const;
43 virtual uint32_t getMaxNumUAVs() const;
44 virtual uint32_t getResourceID(uint32_t) const;
45protected:
46 virtual void setCaps();
47};
48
49/// The AMDGPUCypressDevice is similiar to the AMDGPUEvergreenDevice, except it has
50/// support for double precision operations. This device is used to represent
51/// both the Cypress and Hemlock cards, which are commercially known as HD58XX
52/// and HD59XX cards.
53class AMDGPUCypressDevice : public AMDGPUEvergreenDevice {
54public:
55 AMDGPUCypressDevice(AMDGPUSubtarget *ST);
56 virtual ~AMDGPUCypressDevice();
57private:
58 virtual void setCaps();
59};
60
61
62/// \brief The AMDGPUCedarDevice is the class that represents all of the 'Cedar' based
63/// devices.
64///
65/// This class differs from the base AMDGPUEvergreenDevice in that the
66/// device is a ~quarter of the 'Juniper'. These are commercially known as the
67/// HD54XX and HD53XX series of cards.
68class AMDGPUCedarDevice : public AMDGPUEvergreenDevice {
69public:
70 AMDGPUCedarDevice(AMDGPUSubtarget *ST);
71 virtual ~AMDGPUCedarDevice();
72 virtual size_t getWavefrontSize() const;
73private:
74 virtual void setCaps();
75};
76
77/// \brief The AMDGPURedwoodDevice is the class the represents all of the 'Redwood' based
78/// devices.
79///
80/// This class differs from the base class, in that these devices are
81/// considered about half of a 'Juniper' device. These are commercially known as
82/// the HD55XX and HD56XX series of cards.
83class AMDGPURedwoodDevice : public AMDGPUEvergreenDevice {
84public:
85 AMDGPURedwoodDevice(AMDGPUSubtarget *ST);
86 virtual ~AMDGPURedwoodDevice();
87 virtual size_t getWavefrontSize() const;
88private:
89 virtual void setCaps();
90};
91
92} // namespace llvm
93#endif // AMDILEVERGREENDEVICE_H