Tom Stellard | f98f2ce | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 1 | //===-- AMDILSIDevice.cpp - Device Info for Southern Islands GPUs ---------===// |
| 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 | /// \file |
| 9 | //==-----------------------------------------------------------------------===// |
| 10 | #include "AMDILSIDevice.h" |
Chandler Carruth | 58a2cbe | 2013-01-02 10:22:59 +0000 | [diff] [blame] | 11 | #include "AMDGPUSubtarget.h" |
Tom Stellard | f98f2ce | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 12 | #include "AMDILEvergreenDevice.h" |
| 13 | #include "AMDILNIDevice.h" |
Tom Stellard | f98f2ce | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 14 | |
| 15 | using namespace llvm; |
| 16 | |
| 17 | AMDGPUSIDevice::AMDGPUSIDevice(AMDGPUSubtarget *ST) |
| 18 | : AMDGPUEvergreenDevice(ST) { |
| 19 | } |
| 20 | AMDGPUSIDevice::~AMDGPUSIDevice() { |
| 21 | } |
| 22 | |
| 23 | size_t |
| 24 | AMDGPUSIDevice::getMaxLDSSize() const { |
| 25 | if (usesHardware(AMDGPUDeviceInfo::LocalMem)) { |
| 26 | return MAX_LDS_SIZE_900; |
| 27 | } else { |
| 28 | return 0; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | uint32_t |
| 33 | AMDGPUSIDevice::getGeneration() const { |
| 34 | return AMDGPUDeviceInfo::HD7XXX; |
| 35 | } |
| 36 | |
| 37 | std::string |
| 38 | AMDGPUSIDevice::getDataLayout() const { |
Tom Stellard | ff4faab | 2013-03-04 17:40:28 +0000 | [diff] [blame^] | 39 | return std::string( |
| 40 | "e" |
| 41 | "-p:64:64:64" |
| 42 | "-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64" |
| 43 | "-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128" |
| 44 | "-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024" |
| 45 | "-v2048:2048:2048" |
| 46 | "-n32:64" |
| 47 | ); |
Tom Stellard | f98f2ce | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 48 | } |