-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Add new MIR constant propagation based on dataflow analysis #101168
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
4f9c30f
Add initial version of value analysis and dataflow constant propagation
jachris d0afe68
Try field type normalization instead of forcing it
jachris 601fcc4
Update test results
jachris 56ff16d
Fix spelling
jachris 93ee806
Update test results
jachris c83489c
Remove empty test
jachris bb16397
Clarify registration and tracking of references
jachris 2928694
Add additional flooding when assigning a value and corresponding test
jachris e75ad93
Begin a semi-formal argument for correctness
jachris 1da3033
Change test from usize to i32 to prevent target issues
jachris 3f98dc7
Clarify place expressions vs place objects
jachris ad99d2e
Move handling of references and simplify flooding
jachris 47a00d5
Flood with bottom instead of top for unreachable branches
jachris 8a789ce
Reject registration of downcasts for now
jachris 469fb19
Update other test results
jachris 16dedba
Ignore terminators explicitly
jachris fe84bbf
Add tracking of unreachability
jachris f234419
Rebase onto master
jachris 895181b
Remove leftover test files
jachris 2e4d082
Add more documentation
jachris 2113e45
Remove superfluous line
jachris 904adca
Flood place on drop
jachris 1e5ca57
Use StorageDead and Deinit to flood place
jachris e2ddf8a
Add comment about downcast projection element
jachris 817c277
Handle StorageLive
jachris bc82c13
Track Scalar instead of ScalarInt for const prop
jachris 13b7059
Only allow registration of scalars for now
jachris 6868617
Add tests from current const prop
jachris 4cda6e5
Update test results
jachris 97a69a7
Add some more unit-test directives
jachris c56e99c
Fix typo
jachris f99950f
Update test results after rebase
jachris eab7732
Handle NonDivergingIntrinsic and CopyNonOverlapping
jachris 2f66e94
Flood with bottom for Deinit, StorageLive and StorageDead
jachris b5063ab
Make more assumptions explicit
jachris 1765587
Only track (trivially) freeze types
jachris 7ab1ba9
Remove `Unknown` state in favor of `Value(Top)`
jachris 4478a87
Fix formatting
jachris 111324e
Prevent registration inside references if target is !Freeze
jachris 3c0f3b0
Only assume Stacked Borrows if -Zunsound-mir-opts is given
jachris 7a52e73
Add tests for Stacked Borrows behavior
jachris b9dbb81
Improve example used for SB tests
jachris 5696d06
Use the same is_enabled as the current const prop
jachris aaa35b3
Add comment for the current retag situation
jachris 890fae9
Fix rebased CastKind
jachris 8bed0b5
Update issue-50814.rs test result
jachris 1dde908
Update test results
jachris be9013f
Make overflow flag propagation conditional
jachris 931d99f
Make overflow handling more precise
jachris 274a491
Improve documentation, plus some small changes
jachris 062053b
Fix unimplemented binary_ptr_op
jachris 5b7b309
Improve documentation of assumptions
jachris d86acdd
Prevent propagation of overflow if overflow occured
jachris de69d08
Explicitly match all terminators
jachris efc7ca8
Use ParamEnv consistently
jachris f29533b
Small documentation changes
jachris 1f82a9f
Move HasTop and HasBottom into lattice.rs
jachris da4a40f
Remove copy of current const prop tests and add a few new tests
jachris 630e17d
Limit number of tracked places, and some other perf improvements
jachris b478fcf
Use new cast methods
jachris 72196ee
Limit number of basic blocks and tracked places to 100 for now
jachris 89f9349
Small corrections of documentation
jachris 3997893
Fix rebase
jachris bfbca6c
Completely remove tracking of references for now
jachris 9766ee0
Fix struct field tracking and add tests for it
jachris 8ecb276
Simplify creation of map
jachris 3c6d1a7
Add test for repr(transparent) with scalar
jachris b3f6489
Add comment for guessed constants
jachris 2e034dc
Exclude locals completely, instead of individual places
jachris 74d53ab
Require -Zmir-opt-level >= 3 for now
jachris abe31a9
Partially revert 74d53ab
jachris d66a00a
Expand upon comment regarding self-assignment
jachris ea23585
Disable limits if mir-opt-level >= 4
jachris 108790b
Remove log statement that was commented out
jachris c27ddc9
Remove redundant graphviz escaping
jachris 24d2e90
Bless graphviz tests
jachris 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
Make more assumptions explicit
- Loading branch information
commit b5063ab0e543174e416e34fc130c8b8daba34b41
There are no files selected for viewing
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.