Add validation layer for Derefer#97025
Conversation
This comment has been minimized.
This comment has been minimized.
af54ec1 to
ddd58ed
Compare
This comment has been minimized.
This comment has been minimized.
|
re-rolling as I wrote the change adding a new mir phase (cc @JakobDegen) r? rust-lang/mir-opt |
|
r? @davidtwco |
|
@bors try We should crater this as it adds a new rule to our final MIR output that needs to be upheld or we ICE |
|
⌛ Trying commit 15fb808df52dedb6cd791a19a8eaa3ad88855ba8 with merge 3930b75493eb88cd5431103dbdbc47eb760e9d9b... |
|
☀️ Try build successful - checks-actions |
|
@craterbot run mode=build-only need to run in build mode so that we actually run all mir optimizations |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
@oli-obk just to confirm - debug build is enough to run MIR opts? I don't think crater builds with the release profile today by default. |
yes, it's not important to run any mir opts, it's just important to produce MIR for LLVM |
davidtwco
left a comment
There was a problem hiding this comment.
LGTM, r=me after resolving other comments
|
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
The tests fail on wasm32-unknown-unknown, because this target defaults to - (*_5) = f() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/derefer_inline_test.rs:10:9: 10:12
+ (*_5) = f() -> bb2;We have been generally either ignoring test on this target: |
Thanks, going to add |
f2325c4 to
e71913e
Compare
|
@bors r=davidtwco |
|
📌 Commit e71913e has been approved by |
|
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@c35035c. Direct link to PR: <rust-lang/rust#97025> 💔 miri on windows: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung). 💔 miri on linux: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung).
|
Finished benchmarking commit (c35035c): 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. @rustbot label: -perf-regression Footnotes |
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`
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``
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`
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`
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`
Simplify some code that depend on Deref Now that we can assume rust-lang#97025 works, it's safe to expect Deref is always in the first place of projections. With this, I was able to simplify some code that depended on Deref's place in projections. When we are able to move Derefer before `ElaborateDrops` successfully we will be able to optimize more places. r? `@oli-obk`
Follow up work to #96549 #96116 #95857 #95649
This adds validation for Derefer making sure it is always the first projection.
r? rust-lang/mir-opt