diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-04-25 18:23:33 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-05-02 14:01:01 -0400 |
| commit | 46b342fbc03664566d65e1b3248f89cbef93ef4c (patch) | |
| tree | 7240a1ab4273707acd552117d45621eee0adff18 /src/test | |
| parent | 11b6b0663ae0a89eea913f44aa1eb859b0ef0d3a (diff) | |
| download | rust-46b342fbc03664566d65e1b3248f89cbef93ef4c.tar.gz rust-46b342fbc03664566d65e1b3248f89cbef93ef4c.zip | |
simplify the MirPass traits and passes dramatically
Overall goal: reduce the amount of context a mir pass needs so that it resembles a query. - The hooks are no longer "threaded down" to the pass, but rather run automatically from the top-level (we also thread down the current pass number, so that the files are sorted better). - The hook now receives a *single* callback, rather than a callback per-MIR. - The traits are no longer lifetime parameters, which moved to the methods -- given that we required `for<'tcx>` objecs, there wasn't much point to that. - Several passes now store a `String` instead of a `&'l str` (again, no point).
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/mir-opt/basic_assignment.rs | 4 | ||||
| -rw-r--r-- | src/test/mir-opt/issue-38669.rs | 4 | ||||
| -rw-r--r-- | src/test/mir-opt/simplify_if.rs | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/test/mir-opt/basic_assignment.rs b/src/test/mir-opt/basic_assignment.rs index 9c924a23903..e4eb1aeaf9b 100644 --- a/src/test/mir-opt/basic_assignment.rs +++ b/src/test/mir-opt/basic_assignment.rs @@ -36,7 +36,7 @@ fn main() { } // END RUST SOURCE -// START rustc.node4.SimplifyCfg.initial-after.mir +// START rustc.node4.SimplifyCfg-initial.after.mir // bb0: { // StorageLive(_1); // _1 = const false; @@ -82,4 +82,4 @@ fn main() { // StorageDead(_1); // return; // } -// END rustc.node4.SimplifyCfg.initial-after.mir +// END rustc.node4.SimplifyCfg-initial.after.mir diff --git a/src/test/mir-opt/issue-38669.rs b/src/test/mir-opt/issue-38669.rs index fbbffe8953b..5a9336e9659 100644 --- a/src/test/mir-opt/issue-38669.rs +++ b/src/test/mir-opt/issue-38669.rs @@ -21,7 +21,7 @@ fn main() { } // END RUST SOURCE -// START rustc.node4.SimplifyCfg.initial-after.mir +// START rustc.node4.SimplifyCfg-initial.after.mir // bb0: { // StorageLive(_1); // _1 = const false; @@ -48,4 +48,4 @@ fn main() { // _2 = (); // goto -> bb1; // } -// END rustc.node4.SimplifyCfg.initial-after.mir +// END rustc.node4.SimplifyCfg-initial.after.mir diff --git a/src/test/mir-opt/simplify_if.rs b/src/test/mir-opt/simplify_if.rs index 6e80a917467..cff108246a5 100644 --- a/src/test/mir-opt/simplify_if.rs +++ b/src/test/mir-opt/simplify_if.rs @@ -15,13 +15,13 @@ fn main() { } // END RUST SOURCE -// START rustc.node4.SimplifyBranches.initial-before.mir +// START rustc.node4.SimplifyBranches-initial.before.mir // bb0: { // switchInt(const false) -> [0u8: bb2, otherwise: bb1]; // } -// END rustc.node4.SimplifyBranches.initial-before.mir -// START rustc.node4.SimplifyBranches.initial-after.mir +// END rustc.node4.SimplifyBranches-initial.before.mir +// START rustc.node4.SimplifyBranches-initial.after.mir // bb0: { // goto -> bb2; // } -// END rustc.node4.SimplifyBranches.initial-after.mir +// END rustc.node4.SimplifyBranches-initial.after.mir |
