about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-07-21 19:44:59 -0700
committerGitHub <noreply@github.com>2016-07-21 19:44:59 -0700
commitd46ed83e2e410d6c144657ef284f7ab649e3b70d (patch)
tree4e593af28cae8fcee9b165808ca9706175bf7c6f /src/bootstrap
parent62690b3c3fa6e157daa7f7c5a3af005f37eb4199 (diff)
parent8f9844dd5ccbb8185498601542512d96f1cc3f08 (diff)
downloadrust-d46ed83e2e410d6c144657ef284f7ab649e3b70d.tar.gz
rust-d46ed83e2e410d6c144657ef284f7ab649e3b70d.zip
Auto merge of #34715 - scottcarr:mir-test, r=nikomatsakis
Add MIR Optimization Tests

I've starting working on the infrastructure for testing MIR optimizations.

The plan now is to have a set of test cases (written in Rust), compile them with -Z dump-mir, and check the MIR before and after each pass.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/lib.rs4
-rw-r--r--src/bootstrap/step.rs3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index caa6ea17ea0..367322e8816 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -388,6 +388,10 @@ impl Build {
                     check::compiletest(self, &compiler, target.target,
                                        "pretty", "run-pass-valgrind");
                 }
+                CheckMirOpt { compiler } => {
+                    check::compiletest(self, &compiler, target.target,
+                                       "mir-opt", "mir-opt");
+                }
                 CheckCodegen { compiler } => {
                     check::compiletest(self, &compiler, target.target,
                                        "codegen", "codegen");
diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs
index 1ce8c731232..f715ceb16d7 100644
--- a/src/bootstrap/step.rs
+++ b/src/bootstrap/step.rs
@@ -124,6 +124,7 @@ macro_rules! targets {
             (check_codegen_units, CheckCodegenUnits { compiler: Compiler<'a> }),
             (check_incremental, CheckIncremental { compiler: Compiler<'a> }),
             (check_ui, CheckUi { compiler: Compiler<'a> }),
+            (check_mir_opt, CheckMirOpt { compiler: Compiler<'a> }),
             (check_debuginfo, CheckDebuginfo { compiler: Compiler<'a> }),
             (check_rustdoc, CheckRustdoc { compiler: Compiler<'a> }),
             (check_docs, CheckDocs { compiler: Compiler<'a> }),
@@ -450,6 +451,7 @@ impl<'a> Step<'a> {
                         self.check_pretty_rfail_full(compiler),
                         self.check_rpass_valgrind(compiler),
                         self.check_rmake(compiler),
+                        self.check_mir_opt(compiler),
 
                         // crates
                         self.check_crate_rustc(compiler),
@@ -477,6 +479,7 @@ impl<'a> Step<'a> {
             Source::CheckTidy { stage } => {
                 vec![self.tool_tidy(stage)]
             }
+            Source::CheckMirOpt { compiler} |
             Source::CheckPrettyRPass { compiler } |
             Source::CheckPrettyRFail { compiler } |
             Source::CheckRFail { compiler } |