1 //===-- AMDILNIDevice.cpp - Device Info for Northern Islands devices ------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
9 //==-----------------------------------------------------------------------===//
10 #include "AMDILNIDevice.h"
11 #include "AMDGPUSubtarget.h"
12 #include "AMDILEvergreenDevice.h"
16 AMDGPUNIDevice::AMDGPUNIDevice(AMDGPUSubtarget *ST)
17 : AMDGPUEvergreenDevice(ST) {
18 std::string name = ST->getDeviceName();
19 if (name == "caicos") {
20 DeviceFlag = OCL_DEVICE_CAICOS;
21 } else if (name == "turks") {
22 DeviceFlag = OCL_DEVICE_TURKS;
23 } else if (name == "cayman") {
24 DeviceFlag = OCL_DEVICE_CAYMAN;
26 DeviceFlag = OCL_DEVICE_BARTS;
29 AMDGPUNIDevice::~AMDGPUNIDevice() {
33 AMDGPUNIDevice::getMaxLDSSize() const {
34 if (usesHardware(AMDGPUDeviceInfo::LocalMem)) {
35 return MAX_LDS_SIZE_900;
42 AMDGPUNIDevice::getGeneration() const {
43 return AMDGPUDeviceInfo::HD6XXX;
47 AMDGPUCaymanDevice::AMDGPUCaymanDevice(AMDGPUSubtarget *ST)
48 : AMDGPUNIDevice(ST) {
52 AMDGPUCaymanDevice::~AMDGPUCaymanDevice() {
56 AMDGPUCaymanDevice::setCaps() {
57 if (mSTM->isOverride(AMDGPUDeviceInfo::DoubleOps)) {
58 mHWBits.set(AMDGPUDeviceInfo::DoubleOps);
59 mHWBits.set(AMDGPUDeviceInfo::FMA);
61 mHWBits.set(AMDGPUDeviceInfo::Signed24BitOps);
62 mSWBits.reset(AMDGPUDeviceInfo::Signed24BitOps);
63 mSWBits.set(AMDGPUDeviceInfo::ArenaSegment);