diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp index 1673bfa..67ad286 100644 --- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp +++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp @@ -48,6 +48,12 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const Function &F, MaxNumWorkGroups = ST.getMaxNumWorkGroups(F); assert(MaxNumWorkGroups.size() == 3); + // Temporarily check both the attribute and the subtarget feature, until the + // latter is completely removed. + DynamicVGPRBlockSize = AMDGPU::getDynamicVGPRBlockSize(F); + if (DynamicVGPRBlockSize == 0 && ST.isDynamicVGPREnabled()) + DynamicVGPRBlockSize = ST.getDynamicVGPRBlockSize(); + Occupancy = ST.computeOccupancy(F, getLDSSize()).second; CallingConv::ID CC = F.getCallingConv(); @@ -716,6 +722,7 @@ yaml::SIMachineFunctionInfo::SIMachineFunctionInfo( PSInputAddr(MFI.getPSInputAddr()), PSInputEnable(MFI.getPSInputEnable()), MaxMemoryClusterDWords(MFI.getMaxMemoryClusterDWords()), Mode(MFI.getMode()), HasInitWholeWave(MFI.hasInitWholeWave()), + DynamicVGPRBlockSize(MFI.getDynamicVGPRBlockSize()), ScratchReservedForDynamicVGPRs(MFI.getScratchReservedForDynamicVGPRs()) { for (Register Reg : MFI.getSGPRSpillPhysVGPRs()) SpillPhysVGPRS.push_back(regToString(Reg, TRI)); |