Currently there isn't a generic way to get a smaller register class
that can be produced from a subregister of a larger class. Replaces a
manually implemented version for AMDGPU. This will be used to improve
subregister support in the allocator.
Details
Diff Detail
Event Timeline
| llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp | ||
|---|---|---|
| 276–277 | Why add this "if", given that the generated method handles the NoSubregister case? | |
| llvm/utils/TableGen/RegisterInfoEmitter.cpp | ||
| 1554 | I know this is copied from above but it should be <= not <. | |
| 1589 | This looks like you are handling the NoSubregister case. | |
| llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp | ||
|---|---|---|
| 276–277 | I was thinking it isn't very useful to call if there's a subregister. I blindly copied the 0 case from getSubRegClass | |
| llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp | ||
|---|---|---|
| 276–277 | I have a slight preference for being able to call getSubRegisterClass unconditionally. | |
| llvm/lib/Target/AMDGPU/SIRegisterInfo.h | ||
|---|---|---|
| 281 | It's specifically getting the class of the virtual register in the operand, not the underlying register class implied by the instruction | |
| llvm/lib/Target/AMDGPU/SIRegisterInfo.h | ||
|---|---|---|
| 281 | OK, then I like the current name :) | |
"SubRegIdx".