-
Notifications
You must be signed in to change notification settings - Fork 29
[AIEX] Extend Staged 2D/3D regalloc to avoid spills #685
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
base: aie-public
Are you sure you want to change the base?
Conversation
Thanks you @andcarminati, very much !! |
addPass(createGreedyRegisterAllocator(onlyAllocate3D2DRegisters)); | ||
addPass(createAIESuperRegRewriter()); | ||
if (EnableFineGrainedStagedRA) | ||
addPass(createAIEUnallocatedSuperRegRewriter()); |
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.
Check : I think we should try the following, it should be helpful for onlyAllocate3D2DRegisters
pass
addPass(createGreedyRegisterAllocator(onlyAllocate3DRegisters));
addPass(createAIESuperRegRewriter());
if (EnableFineGrainedStagedRA)
addPass(createAIEUnallocatedSuperRegRewriter());
addPass(createGreedyRegisterAllocator(onlyAllocate3D2DRegisters));
addPass(createAIESuperRegRewriter());
if (EnableFineGrainedStagedRA)
addPass(createAIEUnallocatedSuperRegRewriter());
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 would like to keeps as simple as possible now to setup a common ground first, and then we can test small changes to see the impact. I think it will better to decide.
Also do you think following commit will help ? |
Now we filter by register class and usage. Basically, we exclude here instructions like copies and non-2D/3D ones. Co-Authored-By: Krishnam Tibrewala <[email protected]>
…gisters Co-Authored-By: Krishnam Tibrewala <[email protected]>
Maybe yes! As mentioned before, I prefer to keep just the minimal necessary changes. We can test after, on top of this PR. |
Co-Authored-By: Krishnam Tibrewala <[email protected]>
…reedy run Co-Authored-By: Krishnam Tibrewala <[email protected]>
If we don't need a full register, we can expand to individual lanes. Co-Authored-By: Krishnam Tibrewala <[email protected]>
Co-Authored-By: Krishnam Tibrewala <[email protected]>
Co-Authored-By: Krishnam Tibrewala <[email protected]>
This avoids cycles in bundles that appear in VirtRegRewriter. We also update LIs related to src and dst operands of those expanded copies. Co-Authored-By: Krishnam Tibrewala <[email protected]>
31b7e71
to
a27561f
Compare
This work is intended to avoid 3D/3D (when possible) register spills.
The idea and rationale behind this work is in a previous Draft PR: #442.
To review, I recommend to follow this PR commit by commit.
Credits also for the co-author @krishnamtibrewala.