-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AMDGPU] [SIFrameLowering] Use LiveRegUnits instead of LivePhysRegs #65962
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like the naming of "contains" vs "available" but I don't have a better suggestion so I guess it is OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whole stack LGTM. Thanks for working on this! Have you measured any compile-time difference from this change?
FYI you're currently only supposed to push one commit per pull request |
|
We don't really have a solution right now |
Why not split them into two separate PRs and mention the generic patch's PR info in the second one (AMDGPU-specific)? |
Here's the difference between compile time from both the original and modified builds on compiling tests from llvm-test-suite |
So didn't really do anything for x86, which is expected. Ideally we would have GPU compute compile time tracking but we don't |
da706a7
to
4624fea
Compare
Have updated this branch to retain 'available' in LiveRegUnits as it is while still updating SIFrameLowering (as suggested by @arsenm in [LiveRegUnits] Enhanced the register liveness check) |
4624fea
to
cd00501
Compare
cd00501
to
a69dec0
Compare
If it serves as a proxy for AMDGPU compilation time, here's the difference in time it takes to complete testing the lit tests in "llvm/test/CodeGen/AMDGPU", with the modified branch with LiveRegUnits taking about a second less in multiple trials. |
Sounds good! |
212ecfe
to
8ea9e74
Compare
We need an 'isRegUnitUsed' function similar to 'isPhysRegUsed' in order to implement the loop in 'findUnusedRegister' in terms of MCRegUnits.
8ea9e74
to
5ee8e4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Enhanced liveness checks in LiveRegUnits and then used the modified LiveRegUnits to track liveness in SIFrameLowering.
The first commit is the enhancement to LiveRegUnits and the second commit changes the liveness tracking utility to LiveRegUnits in SIFrameLowering.