-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Pull Derefer before ElaborateDrops #98145
Conversation
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
☔ The latest upstream changes (presumably #97931) made this pull request unmergeable. Please resolve the merge conflicts. |
compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@rustbot author |
9565104
to
2659f22
Compare
☔ The latest upstream changes (presumably #95576) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #98359) made this pull request unmergeable. Please resolve the merge conflicts. |
3243226
to
aa91716
Compare
@bors r+ |
📌 Commit aa91716 has been approved by |
🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened. |
@bors r+ rollup=iffy |
☀️ Test successful - checks-actions |
Finished benchmarking commit (42bd138): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
hmm... looks like all mir queries got a few percent slower. I guess open an issue to track this regression to see if it goes away once we get rid of the new Rvalue |
Pull Derefer before ElaborateDrops _Follow up work to rust-lang#97025 rust-lang#96549 rust-lang#96116 rust-lang#95887 #95649_ This moves `Derefer` before `ElaborateDrops` and creates a new `Rvalue` called `VirtualRef` that allows us to bypass many constraints for `DerefTemp`. r? `@oli-obk`
Optimize `UnDerefer` Addresses the performance [issues](rust-lang#98145 (comment)) faced here. r? `@oli-obk`
Rewrite `UnDerefer` Currently, `UnDerefer` is used by drop elaboration to undo the effects of the `Derefer` pass. However, it just recreates the original places with derefs in the middle of the projection. Because `ProjectionElem::Deref` is intended to be removed completely in the future, this will not work forever. This PR introduces a `deref_chain` method that returns the places behind `DerefTemp` locals in a place and rewrites the move path code to use this. In the process, `UnDerefer` was merged into `MovePathLookup`. Now that move paths use the same places as in the MIR, the other uses of `UnDerefer` no longer require it. See rust-lang#98145 cc `@ouz-a` r? `@oli-obk`
Rewrite `UnDerefer` Currently, `UnDerefer` is used by drop elaboration to undo the effects of the `Derefer` pass. However, it just recreates the original places with derefs in the middle of the projection. Because `ProjectionElem::Deref` is intended to be removed completely in the future, this will not work forever. This PR introduces a `deref_chain` method that returns the places behind `DerefTemp` locals in a place and rewrites the move path code to use this. In the process, `UnDerefer` was merged into `MovePathLookup`. Now that move paths use the same places as in the MIR, the other uses of `UnDerefer` no longer require it. See rust-lang#98145 cc `@ouz-a` r? `@oli-obk`
Follow up work to #97025 #96549 #96116 #95887 #95649
This moves
Derefer
beforeElaborateDrops
and creates a newRvalue
calledVirtualRef
that allows us to bypass many constraints forDerefTemp
.r? @oli-obk