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.
8 //==-----------------------------------------------------------------------===//
9 #include "AMDILNIDevice.h"
10 #include "AMDILEvergreenDevice.h"
11 #include "AMDILSubtarget.h"
15 AMDILNIDevice::AMDILNIDevice(AMDILSubtarget
*ST
)
16 : AMDILEvergreenDevice(ST
)
18 std::string name
= ST
->getDeviceName();
19 if (name
== "caicos") {
20 mDeviceFlag
= OCL_DEVICE_CAICOS
;
21 } else if (name
== "turks") {
22 mDeviceFlag
= OCL_DEVICE_TURKS
;
23 } else if (name
== "cayman") {
24 mDeviceFlag
= OCL_DEVICE_CAYMAN
;
26 mDeviceFlag
= OCL_DEVICE_BARTS
;
29 AMDILNIDevice::~AMDILNIDevice()
34 AMDILNIDevice::getMaxLDSSize() const
36 if (usesHardware(AMDILDeviceInfo::LocalMem
)) {
37 return MAX_LDS_SIZE_900
;
44 AMDILNIDevice::getGeneration() const
46 return AMDILDeviceInfo::HD6XXX
;
50 AMDILCaymanDevice::AMDILCaymanDevice(AMDILSubtarget
*ST
)
56 AMDILCaymanDevice::~AMDILCaymanDevice()
61 AMDILCaymanDevice::setCaps()
63 if (mSTM
->isOverride(AMDILDeviceInfo::DoubleOps
)) {
64 mHWBits
.set(AMDILDeviceInfo::DoubleOps
);
65 mHWBits
.set(AMDILDeviceInfo::FMA
);
67 mHWBits
.set(AMDILDeviceInfo::Signed24BitOps
);
68 mSWBits
.reset(AMDILDeviceInfo::Signed24BitOps
);
69 mSWBits
.set(AMDILDeviceInfo::ArenaSegment
);