-
Notifications
You must be signed in to change notification settings - Fork 189
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
feat(mem2reg): Remove trivial stores #5865
Closed
Closed
Changes from 21 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
e0ad0a9
remove trivial stores
vezenovm 5bbaca8
fmt
vezenovm a66009a
don't include arrays in last store
vezenovm ce31cb0
switch to using get_known_value and set_known_value
vezenovm 45db90b
add from_rc flag to store
vezenovm 96b70bd
cargo fmt
vezenovm 6a0f8c3
Merge branch 'master' into mv/simplify-immediate-stores
vezenovm a595349
Merge branch 'master' into mv/simplify-immediate-stores
vezenovm 82bc2ea
don't call mem2reg and die again to fix uhashmap
vezenovm 6ce03eb
cargo fmt
vezenovm 5c41302
comment out extra mem2reg and die
vezenovm 568c083
remove last_loads approach and add some comments
vezenovm c1c2b61
cleanup
vezenovm 6222963
Merge branch 'master' into mv/simplify-immediate-stores
vezenovm 6ead23d
Merge branch 'master' into mv/simplify-immediate-stores
vezenovm dae5a44
cleanup
vezenovm e920768
Merge remote-tracking branch 'origin/mv/simplify-immediate-stores' in…
vezenovm 4962db1
reduce diff
vezenovm 31224eb
missed push
vezenovm adacab4
cleanup
vezenovm ea39ead
Merge branch 'master' into mv/simplify-immediate-stores
vezenovm 20d20af
remove from_rc from Store and track in mem2reg
vezenovm 2d8f5e6
remove unnecessary
vezenovm 90a4fbe
move rc reload state tracking
vezenovm 90d5715
improve handling of rc reload state and handle call when tracking
vezenovm 96ea083
Merge branch 'master' into mv/simplify-immediate-stores
vezenovm 0db5610
master merge
vezenovm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm not a big fan of including
from_rc
on every store instruction for a mem2reg-specific issue.Can we add tracking to mem2reg specifically instead? E.g. if we see a load -> dec-rc -> store we mark that we can't remove the store?
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'll look at switching to that
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 switched to tracking the current rc reload per instruction with an
Option<(ValueId, bool)>
.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.
Ah something looks to be failing. I had it passing before but I guess I made a bad change while cleaning up.
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 had moved when I was calling my method to track the rc reload state, but this led to inadvertently calling the method on the wrong instruction id. This is now fixed and the PR is ready for review again.
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.
Looks to still be failing on the debugger actually as the debugger inserts foreign calls which are breaking up the expected block of this form:
In the debugger we see the following before mem2reg after the inlining pass: