[AMDGPU] New helper functions to get a register class of a given width
authorJay Foad <jay.foad@amd.com>
Thu, 9 Apr 2020 11:01:05 +0000 (12:01 +0100)
committerJay Foad <jay.foad@amd.com>
Fri, 17 Apr 2020 14:16:57 +0000 (15:16 +0100)
commit96b61571d03aa20183a7f3e7f6fcc9692e7a2a7d
treef8066b7e359d6c45c22048e107893730efd15fcc
parent61ba1481e200b5b35baa81ffcff81acb678e8508
[AMDGPU] New helper functions to get a register class of a given width

Summary:
Introduce new helper functions getVGPRClassForBitWidth,
getAGPRClassForBitWidth, getSGPRClassForBitWidth and use them to
refactor various other functions that all contained their own lists of
valid register class widths. NFC.

Reviewers: arsenm, rampitec

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78311
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/lib/Target/AMDGPU/SIRegisterInfo.h