Allow pass to work separately with SGPR, VGPR registers or both.
This is NFC now but will be needed to split RA for separate
SGPR and VGPR passes.
Details
- Reviewers
arsenm - Commits
- rGd5d412f2aec1: [AMDGPU] Split GCNRegBankReassign
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Can't this just skip virtual registers? Does it really need to know which mode its in?
All registers are virtual here. It will skip a register if there is no assignment in VRM (and obviously skip physregs).
This is slower as it is though. I can add the check "Reg.isPhysical() || !VRM->isAssignedReg(Reg)" earlier to mitigate it.
Will that help?
Why is that slower?
I also would prefer with the allocation split that the final rewrite of registers was done at once at the end. It does commit the intermediate state now, although I don't remember why I did it that way
Simply because I do that check late. It does not matter much until you split the RA. I can move the check earlier, that is not a big deal.
I also would prefer with the allocation split that the final rewrite of registers was done at once at the end. It does commit the intermediate state now, although I don't remember why I did it that way
If you will run rewriter once no changes are needed at all. Just run the pass right before the rewriter. Although currently you are running it twice. What are your plans about this?
I would need to look at it again. For now I guess assume the rewrite will run twice
llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp | ||
---|---|---|
400 | Unrelated, but this is likely a bug. This should cover all meta instructions (most likely this will do the wrong thing for kill) |
llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp | ||
---|---|---|
400 | Ack, will fix it separately. |
Unrelated, but this is likely a bug. This should cover all meta instructions (most likely this will do the wrong thing for kill)