blob: 220de5cebab36e0230c7ea10d03af3f9cd744f20 [file] [log] [blame]
Tom Stellard347ac792015-06-26 21:15:07 +00001//===-- AMDGPUBaseInfo.cpp - AMDGPU Base encoding information--------------===//
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#include "AMDGPUBaseInfo.h"
10#include "llvm/MC/SubtargetFeature.h"
11
12#define GET_SUBTARGETINFO_ENUM
13#include "AMDGPUGenSubtargetInfo.inc"
14#undef GET_SUBTARGETINFO_ENUM
15
16namespace llvm {
17namespace AMDGPU {
18
19IsaVersion getIsaVersion(const FeatureBitset &Features) {
20
21 if (Features.test(FeatureISAVersion7_0_0))
22 return {7, 0, 0};
23
24 if (Features.test(FeatureISAVersion7_0_1))
25 return {7, 0, 1};
26
27 if (Features.test(FeatureISAVersion8_0_0))
28 return {8, 0, 0};
29
30 if (Features.test(FeatureISAVersion8_0_1))
31 return {8, 0, 1};
32
33 return {0, 0, 0};
34}
35
36} // End namespace AMDGPU
37} // End namespace llvm