blob: a37f5a89eda71db80ca97622c10099d29d8d5c77 [file] [log] [blame]
Tom Stellard75aadc22012-12-11 21:25:42 +00001//===-- AMDGPUSubtarget.cpp - AMDGPU Subtarget Information ----------------===//
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//
10/// \file
11/// \brief Implements the AMDGPU specific subclass of TargetSubtarget.
12//
13//===----------------------------------------------------------------------===//
14
15#include "AMDGPUSubtarget.h"
Konstantin Zhuravlyove03b1d72017-02-08 13:02:33 +000016#include "SIMachineFunctionInfo.h"
Matt Arsenaultd9a23ab2014-07-13 02:08:26 +000017#include "llvm/ADT/SmallString.h"
Tom Stellard83f0bce2015-01-29 16:55:25 +000018#include "llvm/CodeGen/MachineScheduler.h"
Eugene Zelenko6a9226d2016-12-12 22:23:53 +000019#include "llvm/Target/TargetFrameLowering.h"
20#include <algorithm>
Matt Arsenaultd9a23ab2014-07-13 02:08:26 +000021
Tom Stellard75aadc22012-12-11 21:25:42 +000022using namespace llvm;
23
Chandler Carruthe96dd892014-04-21 22:55:11 +000024#define DEBUG_TYPE "amdgpu-subtarget"
25
Tom Stellard75aadc22012-12-11 21:25:42 +000026#define GET_SUBTARGETINFO_ENUM
27#define GET_SUBTARGETINFO_TARGET_DESC
28#define GET_SUBTARGETINFO_CTOR
29#include "AMDGPUGenSubtargetInfo.inc"
30
Eugene Zelenko6a9226d2016-12-12 22:23:53 +000031AMDGPUSubtarget::~AMDGPUSubtarget() = default;
Matt Arsenault43e92fe2016-06-24 06:30:11 +000032
Eric Christopherac4b69e2014-07-25 22:22:39 +000033AMDGPUSubtarget &
Daniel Sandersa73f1fd2015-06-10 12:11:26 +000034AMDGPUSubtarget::initializeSubtargetDependencies(const Triple &TT,
35 StringRef GPU, StringRef FS) {
Eric Christopherac4b69e2014-07-25 22:22:39 +000036 // Determine default and user-specified characteristics
Matt Arsenaultf171cf22014-07-14 23:40:49 +000037 // On SI+, we want FP64 denormals to be on by default. FP32 denormals can be
38 // enabled, but some instructions do not respect them and they run at the
39 // double precision rate, so don't enable by default.
40 //
41 // We want to be able to turn these off, but making this a subtarget feature
42 // for SI has the unhelpful behavior that it unsets everything else if you
43 // disable it.
Matt Arsenaultd9a23ab2014-07-13 02:08:26 +000044
Matt Arsenaulta6867fd2017-01-23 22:31:03 +000045 SmallString<256> FullFS("+promote-alloca,+fp64-fp16-denormals,+load-store-opt,");
Changpeng Fangb41574a2015-12-22 20:55:23 +000046 if (isAmdHsaOS()) // Turn on FlatForGlobal for HSA.
Wei Ding205bfdb2017-02-10 02:15:29 +000047 FullFS += "+flat-for-global,+unaligned-buffer-access,+trap-handler,";
Matt Arsenaulta6867fd2017-01-23 22:31:03 +000048
Matt Arsenaultd9a23ab2014-07-13 02:08:26 +000049 FullFS += FS;
50
51 ParseSubtargetFeatures(GPU, FullFS);
Tom Stellard2e59a452014-06-13 01:32:00 +000052
Matt Arsenaultd8f7ea32017-01-27 17:42:26 +000053 // Unless +-flat-for-global is specified, turn on FlatForGlobal for all OS-es
54 // on VI and newer hardware to avoid assertion failures due to missing ADDR64
55 // variants of MUBUF instructions.
56 if (!hasAddr64() && !FS.contains("flat-for-global")) {
57 FlatForGlobal = true;
58 }
59
Eric Christopherac4b69e2014-07-25 22:22:39 +000060 // FIXME: I don't think think Evergreen has any useful support for
61 // denormals, but should be checked. Should we issue a warning somewhere
62 // if someone tries to enable these?
Tom Stellard2e59a452014-06-13 01:32:00 +000063 if (getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS) {
Matt Arsenaulta6867fd2017-01-23 22:31:03 +000064 FP64FP16Denormals = false;
Matt Arsenaultf171cf22014-07-14 23:40:49 +000065 FP32Denormals = false;
Eric Christopherac4b69e2014-07-25 22:22:39 +000066 }
Matt Arsenault24ee0782016-02-12 02:40:47 +000067
68 // Set defaults if needed.
69 if (MaxPrivateElementSize == 0)
Matt Arsenaulte8ed8e52016-05-11 00:28:54 +000070 MaxPrivateElementSize = 4;
Matt Arsenault24ee0782016-02-12 02:40:47 +000071
Eric Christopherac4b69e2014-07-25 22:22:39 +000072 return *this;
73}
74
Daniel Sandersa73f1fd2015-06-10 12:11:26 +000075AMDGPUSubtarget::AMDGPUSubtarget(const Triple &TT, StringRef GPU, StringRef FS,
Matt Arsenault43e92fe2016-06-24 06:30:11 +000076 const TargetMachine &TM)
77 : AMDGPUGenSubtargetInfo(TT, GPU, FS),
78 TargetTriple(TT),
79 Gen(TT.getArch() == Triple::amdgcn ? SOUTHERN_ISLANDS : R600),
80 IsaVersion(ISAVersion0_0_0),
81 WavefrontSize(64),
82 LocalMemorySize(0),
83 LDSBankCount(0),
84 MaxPrivateElementSize(0),
Tom Stellard40ce8af2015-01-28 16:04:26 +000085
Matt Arsenault43e92fe2016-06-24 06:30:11 +000086 FastFMAF32(false),
87 HalfRate64Ops(false),
88
89 FP32Denormals(false),
Matt Arsenaulta6867fd2017-01-23 22:31:03 +000090 FP64FP16Denormals(false),
Matt Arsenault43e92fe2016-06-24 06:30:11 +000091 FPExceptions(false),
92 FlatForGlobal(false),
Tom Stellard64a9d082016-10-14 18:10:39 +000093 UnalignedScratchAccess(false),
Matt Arsenault7f681ac2016-07-01 23:03:44 +000094 UnalignedBufferAccess(false),
95
Matt Arsenaulte823d922017-02-18 18:29:53 +000096 HasApertureRegs(false),
Matt Arsenault43e92fe2016-06-24 06:30:11 +000097 EnableXNACK(false),
Wei Ding205bfdb2017-02-10 02:15:29 +000098 TrapHandler(false),
Matt Arsenault43e92fe2016-06-24 06:30:11 +000099 DebuggerInsertNops(false),
100 DebuggerReserveRegs(false),
Konstantin Zhuravlyovf2f3d142016-06-25 03:11:28 +0000101 DebuggerEmitPrologue(false),
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000102
103 EnableVGPRSpilling(false),
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000104 EnablePromoteAlloca(false),
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000105 EnableLoadStoreOpt(false),
106 EnableUnsafeDSOffsetFolding(false),
107 EnableSIScheduler(false),
108 DumpCode(false),
109
110 FP64(false),
111 IsGCN(false),
112 GCN1Encoding(false),
113 GCN3Encoding(false),
114 CIInsts(false),
115 SGPRInitBug(false),
116 HasSMemRealTime(false),
117 Has16BitInsts(false),
Matt Arsenaultcc88ce32016-10-12 18:00:51 +0000118 HasMovrel(false),
119 HasVGPRIndexMode(false),
Matt Arsenaultc88ba362016-10-29 04:05:06 +0000120 HasScalarStores(false),
Benjamin Kramer11590b82017-01-20 10:37:53 +0000121 HasInv2PiInlineImm(false),
Sam Kolton07dbde22017-01-20 10:01:25 +0000122 HasSDWA(false),
123 HasDPP(false),
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000124 FlatAddressSpace(false),
125
126 R600ALUInst(false),
127 CaymanISA(false),
128 CFALUBug(false),
129 HasVertexCache(false),
130 TexVTXClauseSize(0),
Alexander Timofeev18009562016-12-08 17:28:47 +0000131 ScalarizeGlobal(false),
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000132
133 FeatureDisable(false),
Eugene Zelenko6a9226d2016-12-12 22:23:53 +0000134 InstrItins(getInstrItineraryForCPU(GPU)) {
Tom Stellard40ce8af2015-01-28 16:04:26 +0000135 initializeSubtargetDependencies(TT, GPU, FS);
Tom Stellarda40f9712014-01-22 21:55:43 +0000136}
Tom Stellardb8fd6ef2014-12-02 22:00:07 +0000137
Stanislav Mekhanoshin2b913b12017-02-01 22:59:50 +0000138unsigned AMDGPUSubtarget::getMaxLocalMemSizeWithWaveCount(unsigned NWaves,
139 const Function &F) const {
140 if (NWaves == 1)
Matt Arsenault8a028bf2016-05-16 21:19:59 +0000141 return getLocalMemorySize();
Stanislav Mekhanoshin2b913b12017-02-01 22:59:50 +0000142 unsigned WorkGroupSize = getFlatWorkGroupSizes(F).second;
143 unsigned WorkGroupsPerCu = getMaxWorkGroupsPerCU(WorkGroupSize);
144 unsigned MaxWaves = getMaxWavesPerEU();
145 return getLocalMemorySize() * MaxWaves / WorkGroupsPerCu / NWaves;
Matt Arsenault8a028bf2016-05-16 21:19:59 +0000146}
147
Stanislav Mekhanoshin2b913b12017-02-01 22:59:50 +0000148unsigned AMDGPUSubtarget::getOccupancyWithLocalMemSize(uint32_t Bytes,
149 const Function &F) const {
150 unsigned WorkGroupSize = getFlatWorkGroupSizes(F).second;
151 unsigned WorkGroupsPerCu = getMaxWorkGroupsPerCU(WorkGroupSize);
152 unsigned MaxWaves = getMaxWavesPerEU();
153 unsigned Limit = getLocalMemorySize() * MaxWaves / WorkGroupsPerCu;
154 unsigned NumWaves = Limit / (Bytes ? Bytes : 1u);
155 NumWaves = std::min(NumWaves, MaxWaves);
156 NumWaves = std::max(NumWaves, 1u);
157 return NumWaves;
Matt Arsenault8a028bf2016-05-16 21:19:59 +0000158}
159
Konstantin Zhuravlyov1d650262016-09-06 20:22:28 +0000160std::pair<unsigned, unsigned> AMDGPUSubtarget::getFlatWorkGroupSizes(
161 const Function &F) const {
Konstantin Zhuravlyov1d650262016-09-06 20:22:28 +0000162 // Default minimum/maximum flat work group sizes.
163 std::pair<unsigned, unsigned> Default =
164 AMDGPU::isCompute(F.getCallingConv()) ?
165 std::pair<unsigned, unsigned>(getWavefrontSize() * 2,
166 getWavefrontSize() * 4) :
167 std::pair<unsigned, unsigned>(1, getWavefrontSize());
168
169 // TODO: Do not process "amdgpu-max-work-group-size" attribute once mesa
170 // starts using "amdgpu-flat-work-group-size" attribute.
171 Default.second = AMDGPU::getIntegerAttribute(
172 F, "amdgpu-max-work-group-size", Default.second);
173 Default.first = std::min(Default.first, Default.second);
174
175 // Requested minimum/maximum flat work group sizes.
176 std::pair<unsigned, unsigned> Requested = AMDGPU::getIntegerPairAttribute(
177 F, "amdgpu-flat-work-group-size", Default);
178
179 // Make sure requested minimum is less than requested maximum.
180 if (Requested.first > Requested.second)
181 return Default;
182
183 // Make sure requested values do not violate subtarget's specifications.
184 if (Requested.first < getMinFlatWorkGroupSize())
185 return Default;
186 if (Requested.second > getMaxFlatWorkGroupSize())
187 return Default;
188
189 return Requested;
190}
191
192std::pair<unsigned, unsigned> AMDGPUSubtarget::getWavesPerEU(
193 const Function &F) const {
Konstantin Zhuravlyov1d650262016-09-06 20:22:28 +0000194 // Default minimum/maximum number of waves per execution unit.
Konstantin Zhuravlyovfd871372017-02-09 21:33:23 +0000195 std::pair<unsigned, unsigned> Default(1, getMaxWavesPerEU());
Konstantin Zhuravlyov1d650262016-09-06 20:22:28 +0000196
197 // Default/requested minimum/maximum flat work group sizes.
198 std::pair<unsigned, unsigned> FlatWorkGroupSizes = getFlatWorkGroupSizes(F);
199
200 // If minimum/maximum flat work group sizes were explicitly requested using
201 // "amdgpu-flat-work-group-size" attribute, then set default minimum/maximum
202 // number of waves per execution unit to values implied by requested
203 // minimum/maximum flat work group sizes.
204 unsigned MinImpliedByFlatWorkGroupSize =
205 getMaxWavesPerEU(FlatWorkGroupSizes.second);
206 bool RequestedFlatWorkGroupSize = false;
207
208 // TODO: Do not process "amdgpu-max-work-group-size" attribute once mesa
209 // starts using "amdgpu-flat-work-group-size" attribute.
210 if (F.hasFnAttribute("amdgpu-max-work-group-size") ||
211 F.hasFnAttribute("amdgpu-flat-work-group-size")) {
212 Default.first = MinImpliedByFlatWorkGroupSize;
213 RequestedFlatWorkGroupSize = true;
214 }
215
216 // Requested minimum/maximum number of waves per execution unit.
217 std::pair<unsigned, unsigned> Requested = AMDGPU::getIntegerPairAttribute(
218 F, "amdgpu-waves-per-eu", Default, true);
219
220 // Make sure requested minimum is less than requested maximum.
221 if (Requested.second && Requested.first > Requested.second)
222 return Default;
223
224 // Make sure requested values do not violate subtarget's specifications.
225 if (Requested.first < getMinWavesPerEU() ||
226 Requested.first > getMaxWavesPerEU())
227 return Default;
228 if (Requested.second > getMaxWavesPerEU())
229 return Default;
230
231 // Make sure requested values are compatible with values implied by requested
232 // minimum/maximum flat work group sizes.
233 if (RequestedFlatWorkGroupSize &&
234 Requested.first > MinImpliedByFlatWorkGroupSize)
235 return Default;
236
237 return Requested;
238}
239
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000240R600Subtarget::R600Subtarget(const Triple &TT, StringRef GPU, StringRef FS,
241 const TargetMachine &TM) :
242 AMDGPUSubtarget(TT, GPU, FS, TM),
243 InstrInfo(*this),
244 FrameLowering(TargetFrameLowering::StackGrowsUp, getStackAlignment(), 0),
245 TLInfo(TM, *this) {}
246
247SISubtarget::SISubtarget(const Triple &TT, StringRef GPU, StringRef FS,
248 const TargetMachine &TM) :
249 AMDGPUSubtarget(TT, GPU, FS, TM),
250 InstrInfo(*this),
251 FrameLowering(TargetFrameLowering::StackGrowsUp, getStackAlignment(), 0),
Eugene Zelenko6a9226d2016-12-12 22:23:53 +0000252 TLInfo(TM, *this) {}
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000253
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000254void SISubtarget::overrideSchedPolicy(MachineSchedPolicy &Policy,
Matt Arsenault55dff272016-06-28 00:11:26 +0000255 unsigned NumRegionInstrs) const {
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000256 // Track register pressure so the scheduler can try to decrease
257 // pressure once register usage is above the threshold defined by
258 // SIRegisterInfo::getRegPressureSetLimit()
259 Policy.ShouldTrackPressure = true;
Tom Stellard83f0bce2015-01-29 16:55:25 +0000260
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000261 // Enabling both top down and bottom up scheduling seems to give us less
262 // register spills than just using one of these approaches on its own.
263 Policy.OnlyTopDown = false;
264 Policy.OnlyBottomUp = false;
Tom Stellard83f0bce2015-01-29 16:55:25 +0000265
Alexander Timofeev9f61fea2017-02-14 14:29:05 +0000266 // Enabling ShouldTrackLaneMasks crashes the SI Machine Scheduler.
267 if (!enableSIScheduler())
268 Policy.ShouldTrackLaneMasks = true;
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000269}
Tom Stellard0bc954e2016-03-30 16:35:09 +0000270
Matt Arsenault43e92fe2016-06-24 06:30:11 +0000271bool SISubtarget::isVGPRSpillingEnabled(const Function& F) const {
272 return EnableVGPRSpilling || !AMDGPU::isShader(F.getCallingConv());
273}
Tom Stellard0d23ebe2016-08-29 19:42:52 +0000274
Tom Stellard2f3f9852017-01-25 01:25:13 +0000275unsigned SISubtarget::getKernArgSegmentSize(const MachineFunction &MF,
Konstantin Zhuravlyov27d64c32017-02-08 13:29:23 +0000276 unsigned ExplicitArgBytes) const {
Tom Stellard2f3f9852017-01-25 01:25:13 +0000277 unsigned ImplicitBytes = getImplicitArgNumBytes(MF);
Tom Stellarde88bbc32016-09-23 01:33:26 +0000278 if (ImplicitBytes == 0)
279 return ExplicitArgBytes;
280
281 unsigned Alignment = getAlignmentForImplicitArgPtr();
282 return alignTo(ExplicitArgBytes, Alignment) + ImplicitBytes;
283}
284
Tom Stellard0d23ebe2016-08-29 19:42:52 +0000285unsigned SISubtarget::getOccupancyWithNumSGPRs(unsigned SGPRs) const {
286 if (getGeneration() >= SISubtarget::VOLCANIC_ISLANDS) {
287 if (SGPRs <= 80)
288 return 10;
289 if (SGPRs <= 88)
290 return 9;
291 if (SGPRs <= 100)
292 return 8;
293 return 7;
294 }
295 if (SGPRs <= 48)
296 return 10;
297 if (SGPRs <= 56)
298 return 9;
299 if (SGPRs <= 64)
300 return 8;
301 if (SGPRs <= 72)
302 return 7;
303 if (SGPRs <= 80)
304 return 6;
305 return 5;
306}
307
308unsigned SISubtarget::getOccupancyWithNumVGPRs(unsigned VGPRs) const {
309 if (VGPRs <= 24)
310 return 10;
311 if (VGPRs <= 28)
312 return 9;
313 if (VGPRs <= 32)
314 return 8;
315 if (VGPRs <= 36)
316 return 7;
317 if (VGPRs <= 40)
318 return 6;
319 if (VGPRs <= 48)
320 return 5;
321 if (VGPRs <= 64)
322 return 4;
323 if (VGPRs <= 84)
324 return 3;
325 if (VGPRs <= 128)
326 return 2;
327 return 1;
328}
Matt Arsenault4eae3012016-10-28 20:31:47 +0000329
Konstantin Zhuravlyove03b1d72017-02-08 13:02:33 +0000330unsigned SISubtarget::getReservedNumSGPRs(const MachineFunction &MF) const {
331 const SIMachineFunctionInfo &MFI = *MF.getInfo<SIMachineFunctionInfo>();
332 if (MFI.hasFlatScratchInit()) {
333 if (getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS)
334 return 6; // FLAT_SCRATCH, XNACK, VCC (in that order).
335 if (getGeneration() == AMDGPUSubtarget::SEA_ISLANDS)
336 return 4; // FLAT_SCRATCH, VCC (in that order).
337 }
338
339 if (isXNACKEnabled())
340 return 4; // XNACK, VCC (in that order).
341 return 2; // VCC.
342}
343
344unsigned SISubtarget::getMaxNumSGPRs(const MachineFunction &MF) const {
345 const Function &F = *MF.getFunction();
346 const SIMachineFunctionInfo &MFI = *MF.getInfo<SIMachineFunctionInfo>();
347
348 // Compute maximum number of SGPRs function can use using default/requested
349 // minimum number of waves per execution unit.
350 std::pair<unsigned, unsigned> WavesPerEU = MFI.getWavesPerEU();
351 unsigned MaxNumSGPRs = getMaxNumSGPRs(WavesPerEU.first, false);
352 unsigned MaxAddressableNumSGPRs = getMaxNumSGPRs(WavesPerEU.first, true);
353
354 // Check if maximum number of SGPRs was explicitly requested using
355 // "amdgpu-num-sgpr" attribute.
356 if (F.hasFnAttribute("amdgpu-num-sgpr")) {
357 unsigned Requested = AMDGPU::getIntegerAttribute(
358 F, "amdgpu-num-sgpr", MaxNumSGPRs);
359
360 // Make sure requested value does not violate subtarget's specifications.
361 if (Requested && (Requested <= getReservedNumSGPRs(MF)))
362 Requested = 0;
363
364 // If more SGPRs are required to support the input user/system SGPRs,
365 // increase to accommodate them.
366 //
367 // FIXME: This really ends up using the requested number of SGPRs + number
368 // of reserved special registers in total. Theoretically you could re-use
369 // the last input registers for these special registers, but this would
370 // require a lot of complexity to deal with the weird aliasing.
371 unsigned InputNumSGPRs = MFI.getNumPreloadedSGPRs();
372 if (Requested && Requested < InputNumSGPRs)
373 Requested = InputNumSGPRs;
374
375 // Make sure requested value is compatible with values implied by
376 // default/requested minimum/maximum number of waves per execution unit.
377 if (Requested && Requested > getMaxNumSGPRs(WavesPerEU.first, false))
378 Requested = 0;
379 if (WavesPerEU.second &&
380 Requested && Requested < getMinNumSGPRs(WavesPerEU.second))
381 Requested = 0;
382
383 if (Requested)
384 MaxNumSGPRs = Requested;
385 }
386
Matt Arsenault4eae3012016-10-28 20:31:47 +0000387 if (hasSGPRInitBug())
Konstantin Zhuravlyov9f89ede2017-02-08 14:05:23 +0000388 MaxNumSGPRs = AMDGPU::IsaInfo::FIXED_NUM_SGPRS_FOR_INIT_BUG;
Matt Arsenault4eae3012016-10-28 20:31:47 +0000389
Konstantin Zhuravlyove03b1d72017-02-08 13:02:33 +0000390 return std::min(MaxNumSGPRs - getReservedNumSGPRs(MF),
391 MaxAddressableNumSGPRs);
392}
Matt Arsenault4eae3012016-10-28 20:31:47 +0000393
Konstantin Zhuravlyove03b1d72017-02-08 13:02:33 +0000394unsigned SISubtarget::getMaxNumVGPRs(const MachineFunction &MF) const {
395 const Function &F = *MF.getFunction();
396 const SIMachineFunctionInfo &MFI = *MF.getInfo<SIMachineFunctionInfo>();
397
398 // Compute maximum number of VGPRs function can use using default/requested
399 // minimum number of waves per execution unit.
400 std::pair<unsigned, unsigned> WavesPerEU = MFI.getWavesPerEU();
401 unsigned MaxNumVGPRs = getMaxNumVGPRs(WavesPerEU.first);
402
403 // Check if maximum number of VGPRs was explicitly requested using
404 // "amdgpu-num-vgpr" attribute.
405 if (F.hasFnAttribute("amdgpu-num-vgpr")) {
406 unsigned Requested = AMDGPU::getIntegerAttribute(
407 F, "amdgpu-num-vgpr", MaxNumVGPRs);
408
409 // Make sure requested value does not violate subtarget's specifications.
410 if (Requested && Requested <= getReservedNumVGPRs(MF))
411 Requested = 0;
412
413 // Make sure requested value is compatible with values implied by
414 // default/requested minimum/maximum number of waves per execution unit.
415 if (Requested && Requested > getMaxNumVGPRs(WavesPerEU.first))
416 Requested = 0;
417 if (WavesPerEU.second &&
418 Requested && Requested < getMinNumVGPRs(WavesPerEU.second))
419 Requested = 0;
420
421 if (Requested)
422 MaxNumVGPRs = Requested;
423 }
424
425 return MaxNumVGPRs - getReservedNumVGPRs(MF);
Matt Arsenault4eae3012016-10-28 20:31:47 +0000426}