summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-04-28 22:48:49 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-04-28 22:48:49 +0800
commita8deffa94ee7fe4223a54e127f8085b52531bc52 (patch)
tree1f23c2597d041761926de1a8b9b4ea8c3e445f11 /src
parentfc542c7e32eba2639af9f13368d307174d7045e9 (diff)
downloadmrust-a8deffa94ee7fe4223a54e127f8085b52531bc52.tar.gz
Main - Support running full check before optimisation
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp7
1 files changed, 6 insertions, 1 deletions
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);