Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 1 | //===-- R600Processors.td - R600 Processor definitions --------------------===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
Tom Stellard | c5a154d | 2018-06-28 23:47:12 +0000 | [diff] [blame] | 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, |
| 44 | list<SubtargetFeature> Implies> : |
| 45 | SubtargetFeatureGeneration <Value, "R600Subtarget", Implies>; |
| 46 | |
| 47 | def FeatureR600 : R600SubtargetFeatureGeneration<"R600", |
| 48 | [FeatureR600ALUInst, FeatureFetchLimit8, FeatureLocalMemorySize0] |
| 49 | >; |
| 50 | |
| 51 | def FeatureR700 : R600SubtargetFeatureGeneration<"R700", |
| 52 | [FeatureFetchLimit16, FeatureLocalMemorySize0] |
| 53 | >; |
| 54 | |
| 55 | def FeatureEvergreen : R600SubtargetFeatureGeneration<"EVERGREEN", |
| 56 | [FeatureFetchLimit16, FeatureLocalMemorySize32768] |
| 57 | >; |
| 58 | |
| 59 | def FeatureNorthernIslands : R600SubtargetFeatureGeneration<"NORTHERN_ISLANDS", |
| 60 | [FeatureFetchLimit16, FeatureWavefrontSize64, |
| 61 | FeatureLocalMemorySize32768] |
| 62 | >; |
| 63 | |
| 64 | |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 65 | //===----------------------------------------------------------------------===// |
| 66 | // Radeon HD 2000/3000 Series (R600). |
| 67 | //===----------------------------------------------------------------------===// |
| 68 | |
| 69 | def : Processor<"r600", R600_VLIW5_Itin, |
| 70 | [FeatureR600, FeatureWavefrontSize64, FeatureVertexCache] |
| 71 | >; |
| 72 | |
| 73 | def : Processor<"r630", R600_VLIW5_Itin, |
| 74 | [FeatureR600, FeatureWavefrontSize32, FeatureVertexCache] |
| 75 | >; |
| 76 | |
| 77 | def : Processor<"rs880", R600_VLIW5_Itin, |
| 78 | [FeatureR600, FeatureWavefrontSize16] |
| 79 | >; |
| 80 | |
| 81 | def : Processor<"rv670", R600_VLIW5_Itin, |
Jan Vesely | d1c9b61 | 2017-12-04 22:57:29 +0000 | [diff] [blame] | 82 | [FeatureR600, FeatureWavefrontSize64, FeatureVertexCache] |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 83 | >; |
| 84 | |
| 85 | //===----------------------------------------------------------------------===// |
| 86 | // Radeon HD 4000 Series (R700). |
| 87 | //===----------------------------------------------------------------------===// |
| 88 | |
| 89 | def : Processor<"rv710", R600_VLIW5_Itin, |
| 90 | [FeatureR700, FeatureWavefrontSize32, FeatureVertexCache] |
| 91 | >; |
| 92 | |
| 93 | def : Processor<"rv730", R600_VLIW5_Itin, |
| 94 | [FeatureR700, FeatureWavefrontSize32, FeatureVertexCache] |
| 95 | >; |
| 96 | |
| 97 | def : Processor<"rv770", R600_VLIW5_Itin, |
Jan Vesely | d1c9b61 | 2017-12-04 22:57:29 +0000 | [diff] [blame] | 98 | [FeatureR700, FeatureWavefrontSize64, FeatureVertexCache] |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 99 | >; |
| 100 | |
| 101 | //===----------------------------------------------------------------------===// |
| 102 | // Radeon HD 5000 Series (Evergreen). |
| 103 | //===----------------------------------------------------------------------===// |
| 104 | |
| 105 | def : Processor<"cedar", R600_VLIW5_Itin, |
| 106 | [FeatureEvergreen, FeatureWavefrontSize32, FeatureVertexCache, |
| 107 | FeatureCFALUBug] |
| 108 | >; |
| 109 | |
| 110 | def : Processor<"cypress", R600_VLIW5_Itin, |
Jan Vesely | 39aeab4 | 2017-12-04 23:07:28 +0000 | [diff] [blame] | 111 | [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache, FeatureFMA] |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 112 | >; |
| 113 | |
| 114 | def : Processor<"juniper", R600_VLIW5_Itin, |
| 115 | [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache] |
| 116 | >; |
| 117 | |
| 118 | def : Processor<"redwood", R600_VLIW5_Itin, |
| 119 | [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache, |
| 120 | FeatureCFALUBug] |
| 121 | >; |
| 122 | |
| 123 | def : Processor<"sumo", R600_VLIW5_Itin, |
| 124 | [FeatureEvergreen, FeatureWavefrontSize64, FeatureCFALUBug] |
| 125 | >; |
| 126 | |
| 127 | //===----------------------------------------------------------------------===// |
| 128 | // Radeon HD 6000 Series (Northern Islands). |
| 129 | //===----------------------------------------------------------------------===// |
| 130 | |
| 131 | def : Processor<"barts", R600_VLIW5_Itin, |
| 132 | [FeatureNorthernIslands, FeatureVertexCache, FeatureCFALUBug] |
| 133 | >; |
| 134 | |
| 135 | def : Processor<"caicos", R600_VLIW5_Itin, |
| 136 | [FeatureNorthernIslands, FeatureCFALUBug] |
| 137 | >; |
| 138 | |
| 139 | def : Processor<"cayman", R600_VLIW4_Itin, |
Jan Vesely | 39aeab4 | 2017-12-04 23:07:28 +0000 | [diff] [blame] | 140 | [FeatureNorthernIslands, FeatureCaymanISA, FeatureFMA] |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 141 | >; |
| 142 | |
| 143 | def : Processor<"turks", R600_VLIW5_Itin, |
| 144 | [FeatureNorthernIslands, FeatureVertexCache, FeatureCFALUBug] |
| 145 | >; |