This is an NFC patch in preparation to fix a bug related to always
reserving VGPR32 for AGPR copy.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp | ||
---|---|---|
702 | Actually, it may not work in case of mir lit tests which may not call finalizeLowering(), but may call getReservedRegs(). Nevertheless it is not a good idea to remove constness and mutate const object. For now, since it an NFC patch, and which actually just refactor the code around reserving VGPR for AGPR copy, let me not add code to mutate const object. And, in the next subsequent patch, let me think if we can handle it better. |
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp | ||
---|---|---|
1560 | There is already assert inside getVGPRForAGPRCopy. |
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp | ||
---|---|---|
1560 | The assert inside getVGPRForAGPRCopy() is to assert that some valid VGPR (only in case of gfx908) is identified, which may or may not yet reserved (by calling getReservedRegs()). On the other hand, the assert here assert that the identified valid VGPR is also reserved. |
No need for the initializer. It takes NoRegister by default.