llvm.org GIT mirror llvm / 1684d47
R600: Add wavefront size property to the subtargets v2 v2: - Initialize wavefront size to 0 reviewed-by: Vincent Lejeune <vljn at ovi.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199838 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 6 years ago
4 changed file(s) with 33 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
7171 def FeatureFetchLimit8 : SubtargetFeatureFetchLimit <"8">;
7272 def FeatureFetchLimit16 : SubtargetFeatureFetchLimit <"16">;
7373
74 class SubtargetFeatureWavefrontSize : SubtargetFeature<
75 "wavefrontsize"#Value,
76 "WavefrontSize",
77 !cast(Value),
78 "The number of threads per wavefront">;
79
80 def FeatureWavefrontSize16 : SubtargetFeatureWavefrontSize<16>;
81 def FeatureWavefrontSize32 : SubtargetFeatureWavefrontSize<32>;
82 def FeatureWavefrontSize64 : SubtargetFeatureWavefrontSize<64>;
83
7484 class SubtargetFeatureGeneration
7585 list Implies> :
7686 SubtargetFeature
8696 [FeatureFetchLimit16]>;
8797
8898 def FeatureNorthernIslands : SubtargetFeatureGeneration<"NORTHERN_ISLANDS",
89 [FeatureFetchLimit16]>;
99 [FeatureFetchLimit16, FeatureWavefrontSize64]>;
90100
91101 def FeatureSouthernIslands : SubtargetFeatureGeneration<"SOUTHERN_ISLANDS",
92102 [Feature64BitPtr, FeatureFP64]>;
3737 CaymanISA = false;
3838 EnableIRStructurizer = true;
3939 EnableIfCvt = true;
40 WavefrontSize = 0;
4041 ParseSubtargetFeatures(GPU, FS);
4142 DevName = GPU;
4243 }
7374 AMDGPUSubtarget::isIfCvtEnabled() const {
7475 return EnableIfCvt;
7576 }
77 unsigned
78 AMDGPUSubtarget::getWavefrontSize() const {
79 return WavefrontSize;
80 }
7681 bool
7782 AMDGPUSubtarget::isTargetELF() const {
7883 return false;
5050 bool CaymanISA;
5151 bool EnableIRStructurizer;
5252 bool EnableIfCvt;
53 unsigned WavefrontSize;
5354
5455 InstrItineraryData InstrItins;
5556
6768 bool hasCaymanISA() const;
6869 bool IsIRStructurizerEnabled() const;
6970 bool isIfCvtEnabled() const;
71 unsigned getWavefrontSize() const;
7072
7173 virtual bool enableMachineScheduler() const {
7274 return getGeneration() <= NORTHERN_ISLANDS;
1616 [FeatureR600, FeatureVertexCache]>;
1717
1818 def : Proc<"r600", R600_VLIW5_Itin,
19 [FeatureR600 , FeatureVertexCache]>;
19 [FeatureR600 , FeatureVertexCache, FeatureWavefrontSize64]>;
20
21 def : Proc<"r630", R600_VLIW5_Itin,
22 [FeatureR600, FeatureVertexCache, FeatureWavefrontSize32]>;
2023
2124 def : Proc<"rs880", R600_VLIW5_Itin,
22 [FeatureR600]>;
25 [FeatureR600, FeatureWavefrontSize16]>;
2326
2427 def : Proc<"rv670", R600_VLIW5_Itin,
25 [FeatureR600, FeatureFP64, FeatureVertexCache]>;
28 [FeatureR600, FeatureFP64, FeatureVertexCache, FeatureWavefrontSize64]>;
2629
2730 //===----------------------------------------------------------------------===//
2831 // R700
2932 //===----------------------------------------------------------------------===//
3033
3134 def : Proc<"rv710", R600_VLIW5_Itin,
32 [FeatureR700, FeatureVertexCache]>;
35 [FeatureR700, FeatureVertexCache, FeatureWavefrontSize32]>;
3336
3437 def : Proc<"rv730", R600_VLIW5_Itin,
35 [FeatureR700, FeatureVertexCache]>;
38 [FeatureR700, FeatureVertexCache, FeatureWavefrontSize32]>;
3639
3740 def : Proc<"rv770", R600_VLIW5_Itin,
38 [FeatureR700, FeatureFP64, FeatureVertexCache]>;
41 [FeatureR700, FeatureFP64, FeatureVertexCache, FeatureWavefrontSize64]>;
3942
4043 //===----------------------------------------------------------------------===//
4144 // Evergreen
4245 //===----------------------------------------------------------------------===//
4346
4447 def : Proc<"cedar", R600_VLIW5_Itin,
45 [FeatureEvergreen, FeatureVertexCache]>;
48 [FeatureEvergreen, FeatureVertexCache, FeatureWavefrontSize32]>;
4649
4750 def : Proc<"redwood", R600_VLIW5_Itin,
48 [FeatureEvergreen, FeatureVertexCache]>;
51 [FeatureEvergreen, FeatureVertexCache, FeatureWavefrontSize64]>;
4952
5053 def : Proc<"sumo", R600_VLIW5_Itin,
51 [FeatureEvergreen]>;
54 [FeatureEvergreen, FeatureWavefrontSize64]>;
5255
5356 def : Proc<"juniper", R600_VLIW5_Itin,
54 [FeatureEvergreen, FeatureVertexCache]>;
57 [FeatureEvergreen, FeatureVertexCache, FeatureWavefrontSize64]>;
5558
5659 def : Proc<"cypress", R600_VLIW5_Itin,
57 [FeatureEvergreen, FeatureFP64, FeatureVertexCache]>;
60 [FeatureEvergreen, FeatureFP64, FeatureVertexCache,
61 FeatureWavefrontSize64]>;
5862
5963 //===----------------------------------------------------------------------===//
6064 // Northern Islands