Uh oh!
There was an error while loading. Please reload this page.
Add validation layer for Derefer - #97025
Conversation
This comment has been minimized.
This comment has been minimized.
af54ec1 to
ddd58edCompare
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
oli-obk
commented
May 16, 2022
re-rolling as I wrote the change adding a new mir phase (cc @JakobDegen) r? rust-lang/mir-opt |
oli-obk
commented
May 16, 2022
r? @davidtwco |
oli-obk
commented
May 16, 2022
@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 |
bors
commented
May 16, 2022
⌛ Trying commit 15fb808df52dedb6cd791a19a8eaa3ad88855ba8 with merge 3930b75493eb88cd5431103dbdbc47eb760e9d9b... |
bors
commented
May 16, 2022
☀️ Try build successful - checks-actions |
Uh oh!
There was an error while loading. Please reload this page.
oli-obk
commented
May 17, 2022
@craterbot run mode=build-only need to run in build mode so that we actually run all mir optimizations |
craterbot
commented
May 17, 2022
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
Mark-Simulacrum
commented
May 17, 2022
@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. |
oli-obk
commented
May 17, 2022
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
bors
commented
May 29, 2022
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
tmiasko
commented
May 30, 2022
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
e71913eCompareoli-obk
commented
May 30, 2022
@bors r=davidtwco |
bors
commented
May 30, 2022
📌 Commit e71913e has been approved by |
bors
commented
May 30, 2022
bors
commented
May 30, 2022
☀️ 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).
rust-timer
commented
May 31, 2022
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#97025rust-lang#96549rust-lang#96116rust-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#97025rust-lang#96549rust-lang#96116rust-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#97025rust-lang#96549rust-lang#96116rust-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#97025rust-lang#96549rust-lang#96116rust-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#97025rust-lang#96549rust-lang#96116rust-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