Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 1 | //===-- R600Processors.td - R600 Processor definitions --------------------===// |
| 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 | |
Tom Stellard | c5a154d | 2018-06-28 23:47:12 +0000 | [diff] [blame^] | 10 | class SubtargetFeatureFetchLimit <string Value> : |
| 11 | SubtargetFeature <"fetch"#Value, |
| 12 | "TexVTXClauseSize", |
| 13 | Value, |
| 14 | "Limit the maximum number of fetches in a clause to "#Value |
| 15 | >; |
| 16 | |
| 17 | def FeatureR600ALUInst : SubtargetFeature<"R600ALUInst", |
| 18 | "R600ALUInst", |
| 19 | "false", |
| 20 | "Older version of ALU instructions encoding" |
| 21 | >; |
| 22 | |
| 23 | def FeatureFetchLimit8 : SubtargetFeatureFetchLimit <"8">; |
| 24 | def FeatureFetchLimit16 : SubtargetFeatureFetchLimit <"16">; |
| 25 | |
| 26 | def FeatureVertexCache : SubtargetFeature<"HasVertexCache", |
| 27 | "HasVertexCache", |
| 28 | "true", |
| 29 | "Specify use of dedicated vertex cache" |
| 30 | >; |
| 31 | |
| 32 | def FeatureCaymanISA : SubtargetFeature<"caymanISA", |
| 33 | "CaymanISA", |
| 34 | "true", |
| 35 | "Use Cayman ISA" |
| 36 | >; |
| 37 | |
| 38 | def FeatureCFALUBug : SubtargetFeature<"cfalubug", |
| 39 | "CFALUBug", |
| 40 | "true", |
| 41 | "GPU has CF_ALU bug" |
| 42 | >; |
| 43 | |
| 44 | class R600SubtargetFeatureGeneration <string Value, |
| 45 | list<SubtargetFeature> Implies> : |
| 46 | SubtargetFeatureGeneration <Value, "R600Subtarget", Implies>; |
| 47 | |
| 48 | def FeatureR600 : R600SubtargetFeatureGeneration<"R600", |
| 49 | [FeatureR600ALUInst, FeatureFetchLimit8, FeatureLocalMemorySize0] |
| 50 | >; |
| 51 | |
| 52 | def FeatureR700 : R600SubtargetFeatureGeneration<"R700", |
| 53 | [FeatureFetchLimit16, FeatureLocalMemorySize0] |
| 54 | >; |
| 55 | |
| 56 | def FeatureEvergreen : R600SubtargetFeatureGeneration<"EVERGREEN", |
| 57 | [FeatureFetchLimit16, FeatureLocalMemorySize32768] |
| 58 | >; |
| 59 | |
| 60 | def FeatureNorthernIslands : R600SubtargetFeatureGeneration<"NORTHERN_ISLANDS", |
| 61 | [FeatureFetchLimit16, FeatureWavefrontSize64, |
| 62 | FeatureLocalMemorySize32768] |
| 63 | >; |
| 64 | |
| 65 | |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 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, |
Jan Vesely | d1c9b61 | 2017-12-04 22:57:29 +0000 | [diff] [blame] | 83 | [FeatureR600, FeatureWavefrontSize64, FeatureVertexCache] |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 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, |
Jan Vesely | d1c9b61 | 2017-12-04 22:57:29 +0000 | [diff] [blame] | 99 | [FeatureR700, FeatureWavefrontSize64, FeatureVertexCache] |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 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, |
Jan Vesely | 39aeab4 | 2017-12-04 23:07:28 +0000 | [diff] [blame] | 112 | [FeatureEvergreen, FeatureWavefrontSize64, FeatureVertexCache, FeatureFMA] |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 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, |
Jan Vesely | 39aeab4 | 2017-12-04 23:07:28 +0000 | [diff] [blame] | 141 | [FeatureNorthernIslands, FeatureCaymanISA, FeatureFMA] |
Konstantin Zhuravlyov | 27b0a03 | 2017-11-10 20:01:58 +0000 | [diff] [blame] | 142 | >; |
| 143 | |
| 144 | def : Processor<"turks", R600_VLIW5_Itin, |
| 145 | [FeatureNorthernIslands, FeatureVertexCache, FeatureCFALUBug] |
| 146 | >; |