]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/llvm/lib/Target/AMDGPU/R600Processors.td
MFC r355940:
[FreeBSD/FreeBSD.git] / contrib / llvm-project / llvm / lib / Target / AMDGPU / R600Processors.td
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
9 class 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
16 def FeatureR600ALUInst : SubtargetFeature<"R600ALUInst",
17   "R600ALUInst",
18   "false",
19   "Older version of ALU instructions encoding"
20 >;
21
22 def FeatureFetchLimit8 : SubtargetFeatureFetchLimit <"8">;
23 def FeatureFetchLimit16 : SubtargetFeatureFetchLimit <"16">;
24
25 def FeatureVertexCache : SubtargetFeature<"HasVertexCache",
26   "HasVertexCache",
27   "true",
28   "Specify use of dedicated vertex cache"
29 >;
30
31 def FeatureCaymanISA : SubtargetFeature<"caymanISA",
32   "CaymanISA",
33   "true",
34   "Use Cayman ISA"
35 >;
36
37 def FeatureCFALUBug : SubtargetFeature<"cfalubug",
38   "CFALUBug",
39   "true",
40   "GPU has CF_ALU bug"
41 >;
42
43 class R600SubtargetFeatureGeneration <string Value, string FeatureName,
44                                   list<SubtargetFeature> Implies> :
45         SubtargetFeatureGeneration <Value, FeatureName, "R600Subtarget", Implies>;
46
47 def FeatureR600 : R600SubtargetFeatureGeneration<"R600", "r600",
48   [FeatureR600ALUInst, FeatureFetchLimit8, FeatureLocalMemorySize0]
49 >;
50
51 def FeatureR700 : R600SubtargetFeatureGeneration<"R700", "r700",
52   [FeatureFetchLimit16, FeatureLocalMemorySize0]
53 >;
54
55 def FeatureEvergreen : R600SubtargetFeatureGeneration<"EVERGREEN", "evergreen",
56   [FeatureFetchLimit16, FeatureLocalMemorySize32768]
57 >;
58
59 def 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
70 def : Processor<"r600", R600_VLIW5_Itin,
71   [FeatureR600, FeatureWavefrontSize64, FeatureVertexCache]
72 >;
73
74 def : Processor<"r630", R600_VLIW5_Itin,
75   [FeatureR600, FeatureWavefrontSize32, FeatureVertexCache]
76 >;
77
78 def : Processor<"rs880", R600_VLIW5_Itin,
79   [FeatureR600, FeatureWavefrontSize16]
80 >;
81
82 def : Processor<"rv670", R600_VLIW5_Itin,
83   [FeatureR600, FeatureWavefrontSize64, FeatureVertexCache]
84 >;
85
86 //===----------------------------------------------------------------------===//
87 // Radeon HD 4000 Series (R700).
88 //===----------------------------------------------------------------------===//
89
90 def : Processor<"rv710", R600_VLIW5_Itin,
91   [FeatureR700, FeatureWavefrontSize32, FeatureVertexCache]
92 >;
93
94 def : Processor<"rv730", R600_VLIW5_Itin,
95   [FeatureR700, FeatureWavefrontSize32, FeatureVertexCache]
96 >;
97
98 def : Processor<"rv770", R600_VLIW5_Itin,
99   [FeatureR700, FeatureWavefrontSize64, FeatureVertexCache]
100 >;
101
102 //===----------------------------------------------------------------------===//
103 // Radeon HD 5000 Series (Evergreen).
104 //===----------------------------------------------------------------------===//
105
106 def : Processor<"cedar", R600_VLIW5_Itin,
107   [FeatureEvergreen, FeatureWavefrontSize32, FeatureVertexCache,
108    FeatureCFALUBug]
109 >;
110
111 def : Processor<"cypress", R600_VLIW5_Itin,
112   [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache, FeatureFMA]
113 >;
114
115 def : Processor<"juniper", R600_VLIW5_Itin,
116   [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache]
117 >;
118
119 def : Processor<"redwood", R600_VLIW5_Itin,
120   [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache,
121    FeatureCFALUBug]
122 >;
123
124 def : Processor<"sumo", R600_VLIW5_Itin,
125   [FeatureEvergreen, FeatureWavefrontSize64, FeatureCFALUBug]
126 >;
127
128 //===----------------------------------------------------------------------===//
129 // Radeon HD 6000 Series (Northern Islands).
130 //===----------------------------------------------------------------------===//
131
132 def : Processor<"barts", R600_VLIW5_Itin,
133   [FeatureNorthernIslands, FeatureVertexCache, FeatureCFALUBug]
134 >;
135
136 def : Processor<"caicos", R600_VLIW5_Itin,
137   [FeatureNorthernIslands, FeatureCFALUBug]
138 >;
139
140 def : Processor<"cayman", R600_VLIW4_Itin,
141   [FeatureNorthernIslands, FeatureCaymanISA, FeatureFMA]
142 >;
143
144 def : Processor<"turks", R600_VLIW5_Itin,
145   [FeatureNorthernIslands, FeatureVertexCache, FeatureCFALUBug]
146 >;