• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"
11 #include "AMDGPUSubtarget.h"
12 #include "AMDILEvergreenDevice.h"
13 #include "AMDILNIDevice.h"
14 
15 using namespace llvm;
16 
AMDGPUSIDevice(AMDGPUSubtarget * ST)17 AMDGPUSIDevice::AMDGPUSIDevice(AMDGPUSubtarget *ST)
18   : AMDGPUEvergreenDevice(ST) {
19 }
~AMDGPUSIDevice()20 AMDGPUSIDevice::~AMDGPUSIDevice() {
21 }
22 
23 size_t
getMaxLDSSize() const24 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
getGeneration() const33 AMDGPUSIDevice::getGeneration() const {
34   return AMDGPUDeviceInfo::HD7XXX;
35 }
36 
37 std::string
getDataLayout() const38 AMDGPUSIDevice::getDataLayout() const {
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   );
48 }
49