-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bless
mir_opt
tests that were broken by DSE.
Adding the DSE pass changed the emitted MIR for a bunch of other test. This commit blesses/fixes these changes. In some cases, this required adding some `black_box` calls to inhibit the DSE optimizations.
- Loading branch information
1 parent
81f8c12
commit 7a30d3e
Showing
15 changed files
with
136 additions
and
119 deletions.
There are no files selected for viewing
177 changes: 95 additions & 82 deletions
177
src/test/mir-opt/const_debuginfo.main.ConstDebugInfo.diff
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
51 changes: 35 additions & 16 deletions
51
src/test/mir-opt/tls_access.main.SimplifyCfg-final.after.mir
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,46 @@ | ||
// MIR for `main` after SimplifyCfg-final | ||
|
||
fn main() -> () { | ||
let mut _0: (); // return place in scope 0 at $DIR/tls-access.rs:6:11: 6:11 | ||
let _2: *mut u8; // in scope 0 at $DIR/tls-access.rs:8:18: 8:21 | ||
let mut _3: *mut u8; // in scope 0 at $DIR/tls-access.rs:9:9: 9:12 | ||
let mut _0: (); // return place in scope 0 at $DIR/tls-access.rs:7:11: 7:11 | ||
let _2: *mut u8; // in scope 0 at $DIR/tls-access.rs:9:18: 9:21 | ||
let mut _3: *mut u8; // in scope 0 at $DIR/tls-access.rs:10:9: 10:12 | ||
let _4: (); // in scope 0 at $DIR/tls-access.rs:11:9: 11:34 | ||
let mut _5: (); // in scope 0 at $DIR/tls-access.rs:11:31: 11:33 | ||
scope 1 { | ||
let _1: &u8; // in scope 1 at $DIR/tls-access.rs:8:13: 8:14 | ||
let _1: &u8; // in scope 1 at $DIR/tls-access.rs:9:13: 9:14 | ||
scope 2 { | ||
debug a => _1; // in scope 2 at $DIR/tls-access.rs:8:13: 8:14 | ||
debug a => _1; // in scope 2 at $DIR/tls-access.rs:9:13: 9:14 | ||
scope 3 (inlined std::hint::black_box::<()>) { // at $DIR/tls-access.rs:11:9: 11:34 | ||
debug dummy => _5; // in scope 3 at $DIR/tls-access.rs:11:9: 11:34 | ||
let mut _6: (); // in scope 3 at $DIR/tls-access.rs:11:9: 11:34 | ||
} | ||
} | ||
} | ||
|
||
bb0: { | ||
StorageLive(_1); // scope 1 at $DIR/tls-access.rs:8:13: 8:14 | ||
StorageLive(_2); // scope 1 at $DIR/tls-access.rs:8:18: 8:21 | ||
_2 = &/*tls*/ mut FOO; // scope 1 at $DIR/tls-access.rs:8:18: 8:21 | ||
_1 = &(*_2); // scope 1 at $DIR/tls-access.rs:8:17: 8:21 | ||
StorageLive(_3); // scope 2 at $DIR/tls-access.rs:9:9: 9:12 | ||
_3 = &/*tls*/ mut FOO; // scope 2 at $DIR/tls-access.rs:9:9: 9:12 | ||
(*_3) = const 42_u8; // scope 2 at $DIR/tls-access.rs:9:9: 9:17 | ||
StorageDead(_3); // scope 2 at $DIR/tls-access.rs:9:17: 9:18 | ||
StorageDead(_2); // scope 1 at $DIR/tls-access.rs:10:5: 10:6 | ||
StorageDead(_1); // scope 1 at $DIR/tls-access.rs:10:5: 10:6 | ||
return; // scope 0 at $DIR/tls-access.rs:11:2: 11:2 | ||
StorageLive(_1); // scope 1 at $DIR/tls-access.rs:9:13: 9:14 | ||
StorageLive(_2); // scope 1 at $DIR/tls-access.rs:9:18: 9:21 | ||
_2 = &/*tls*/ mut FOO; // scope 1 at $DIR/tls-access.rs:9:18: 9:21 | ||
_1 = &(*_2); // scope 1 at $DIR/tls-access.rs:9:17: 9:21 | ||
StorageLive(_3); // scope 2 at $DIR/tls-access.rs:10:9: 10:12 | ||
_3 = &/*tls*/ mut FOO; // scope 2 at $DIR/tls-access.rs:10:9: 10:12 | ||
(*_3) = const 42_u8; // scope 2 at $DIR/tls-access.rs:10:9: 10:17 | ||
StorageDead(_3); // scope 2 at $DIR/tls-access.rs:10:17: 10:18 | ||
StorageLive(_4); // scope 2 at $DIR/tls-access.rs:11:9: 11:34 | ||
StorageLive(_5); // scope 2 at $DIR/tls-access.rs:11:31: 11:33 | ||
StorageLive(_6); // scope 3 at $DIR/tls-access.rs:11:9: 11:34 | ||
_4 = std::intrinsics::black_box::<()>(const ()) -> bb1; // scope 3 at $DIR/tls-access.rs:11:9: 11:34 | ||
// mir::Constant | ||
// + span: $DIR/tls-access.rs:11:9: 11:34 | ||
// + literal: Const { ty: extern "rust-intrinsic" fn(()) {std::intrinsics::black_box::<()>}, val: Value(Scalar(<ZST>)) } | ||
} | ||
|
||
bb1: { | ||
StorageDead(_6); // scope 3 at $DIR/tls-access.rs:11:9: 11:34 | ||
StorageDead(_5); // scope 2 at $DIR/tls-access.rs:11:33: 11:34 | ||
StorageDead(_4); // scope 2 at $DIR/tls-access.rs:11:34: 11:35 | ||
StorageDead(_2); // scope 1 at $DIR/tls-access.rs:12:5: 12:6 | ||
StorageDead(_1); // scope 1 at $DIR/tls-access.rs:12:5: 12:6 | ||
return; // scope 0 at $DIR/tls-access.rs:13:2: 13:2 | ||
} | ||
} |
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