• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===-- R600Processors.td - R600 Processor definitions --------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9class SubtargetFeatureFetchLimit <string Value> :
10                          SubtargetFeature <"fetch"#Value,
11  "TexVTXClauseSize",
12  Value,
13  "Limit the maximum number of fetches in a clause to "#Value
14>;
15
16def FeatureR600ALUInst : SubtargetFeature<"R600ALUInst",
17  "R600ALUInst",
18  "false",
19  "Older version of ALU instructions encoding"
20>;
21
22def FeatureFetchLimit8 : SubtargetFeatureFetchLimit <"8">;
23def FeatureFetchLimit16 : SubtargetFeatureFetchLimit <"16">;
24
25def FeatureVertexCache : SubtargetFeature<"HasVertexCache",
26  "HasVertexCache",
27  "true",
28  "Specify use of dedicated vertex cache"
29>;
30
31def FeatureCaymanISA : SubtargetFeature<"caymanISA",
32  "CaymanISA",
33  "true",
34  "Use Cayman ISA"
35>;
36
37def FeatureCFALUBug : SubtargetFeature<"cfalubug",
38  "CFALUBug",
39  "true",
40  "GPU has CF_ALU bug"
41>;
42
43class R600SubtargetFeatureGeneration <string Value, string FeatureName,
44                                  list<SubtargetFeature> Implies> :
45        SubtargetFeatureGeneration <Value, FeatureName, "R600Subtarget", Implies>;
46
47def FeatureR600 : R600SubtargetFeatureGeneration<"R600", "r600",
48  [FeatureR600ALUInst, FeatureFetchLimit8, FeatureLocalMemorySize0]
49>;
50
51def FeatureR700 : R600SubtargetFeatureGeneration<"R700", "r700",
52  [FeatureFetchLimit16, FeatureLocalMemorySize0]
53>;
54
55def FeatureEvergreen : R600SubtargetFeatureGeneration<"EVERGREEN", "evergreen",
56  [FeatureFetchLimit16, FeatureLocalMemorySize32768]
57>;
58
59def FeatureNorthernIslands : R600SubtargetFeatureGeneration<"NORTHERN_ISLANDS",
60  "northern-islands",
61  [FeatureFetchLimit16, FeatureWavefrontSize64,
62   FeatureLocalMemorySize32768]
63>;
64
65
66//===----------------------------------------------------------------------===//
67// Radeon HD 2000/3000 Series (R600).
68//===----------------------------------------------------------------------===//
69
70def : Processor<"r600", R600_VLIW5_Itin,
71  [FeatureR600, FeatureWavefrontSize64, FeatureVertexCache]
72>;
73
74def : Processor<"r630", R600_VLIW5_Itin,
75  [FeatureR600, FeatureWavefrontSize32, FeatureVertexCache]
76>;
77
78def : Processor<"rs880", R600_VLIW5_Itin,
79  [FeatureR600, FeatureWavefrontSize16]
80>;
81
82def : Processor<"rv670", R600_VLIW5_Itin,
83  [FeatureR600, FeatureWavefrontSize64, FeatureVertexCache]
84>;
85
86//===----------------------------------------------------------------------===//
87// Radeon HD 4000 Series (R700).
88//===----------------------------------------------------------------------===//
89
90def : Processor<"rv710", R600_VLIW5_Itin,
91  [FeatureR700, FeatureWavefrontSize32, FeatureVertexCache]
92>;
93
94def : Processor<"rv730", R600_VLIW5_Itin,
95  [FeatureR700, FeatureWavefrontSize32, FeatureVertexCache]
96>;
97
98def : Processor<"rv770", R600_VLIW5_Itin,
99  [FeatureR700, FeatureWavefrontSize64, FeatureVertexCache]
100>;
101
102//===----------------------------------------------------------------------===//
103// Radeon HD 5000 Series (Evergreen).
104//===----------------------------------------------------------------------===//
105
106def : Processor<"cedar", R600_VLIW5_Itin,
107  [FeatureEvergreen, FeatureWavefrontSize32, FeatureVertexCache,
108   FeatureCFALUBug]
109>;
110
111def : Processor<"cypress", R600_VLIW5_Itin,
112  [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache, FeatureFMA]
113>;
114
115def : Processor<"juniper", R600_VLIW5_Itin,
116  [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache]
117>;
118
119def : Processor<"redwood", R600_VLIW5_Itin,
120  [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache,
121   FeatureCFALUBug]
122>;
123
124def : Processor<"sumo", R600_VLIW5_Itin,
125  [FeatureEvergreen, FeatureWavefrontSize64, FeatureCFALUBug]
126>;
127
128//===----------------------------------------------------------------------===//
129// Radeon HD 6000 Series (Northern Islands).
130//===----------------------------------------------------------------------===//
131
132def : Processor<"barts", R600_VLIW5_Itin,
133  [FeatureNorthernIslands, FeatureVertexCache, FeatureCFALUBug]
134>;
135
136def : Processor<"caicos", R600_VLIW5_Itin,
137  [FeatureNorthernIslands, FeatureCFALUBug]
138>;
139
140def : Processor<"cayman", R600_VLIW4_Itin,
141  [FeatureNorthernIslands, FeatureCaymanISA, FeatureFMA]
142>;
143
144def : Processor<"turks", R600_VLIW5_Itin,
145  [FeatureNorthernIslands, FeatureVertexCache, FeatureCFALUBug]
146>;
147