From a8deffa94ee7fe4223a54e127f8085b52531bc52 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 28 Apr 2017 22:48:49 +0800 Subject: Main - Support running full check before optimisation --- src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 71b0f9ce..cb506ffb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -444,6 +444,12 @@ int main(int argc, char *argv[]) CompilePhaseV("MIR Cleanup", [&]() { MIR_CleanupCrate(*hir_crate); }); + if( getenv("MRUSTC_FULL_VALIDATE_PREOPT") ) + { + CompilePhaseV("MIR Validate Full", [&]() { + MIR_CheckCrate_Full(*hir_crate); + }); + } // Optimise the MIR CompilePhaseV("MIR Optimise", [&]() { @@ -459,7 +465,6 @@ int main(int argc, char *argv[]) }); // - Exhaustive MIR validation (follows every code path and checks variable validity) // > DEBUGGING ONLY - // > DISBALED: Excessive memory usage on complex functions CompilePhaseV("MIR Validate Full", [&]() { if( getenv("MRUSTC_FULL_VALIDATE") ) MIR_CheckCrate_Full(*hir_crate); -- cgit v1.2.3