summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-04-28 21:21:58 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-04-28 21:21:58 +0800
commit4de1bdb03d48b2741ec1075a55f5d726facb6f91 (patch)
treee806672391ea9b35eea5cc702be2459fecfab19d /src
parentd9d78dbc959089afbeb9ef48826689a52f7ce8c6 (diff)
downloadmrust-4de1bdb03d48b2741ec1075a55f5d726facb6f91.tar.gz
Main - Allow env var enabling of full MIR check
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0d1c208c..71b0f9ce 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -68,6 +68,7 @@ void init_debug_list()
g_debug_disable_map.insert( "MIR Cleanup" );
g_debug_disable_map.insert( "MIR Optimise" );
g_debug_disable_map.insert( "MIR Validate PO" );
+ g_debug_disable_map.insert( "MIR Validate Full" );
g_debug_disable_map.insert( "HIR Serialise" );
g_debug_disable_map.insert( "Trans Enumerate" );
@@ -443,6 +444,7 @@ int main(int argc, char *argv[])
CompilePhaseV("MIR Cleanup", [&]() {
MIR_CleanupCrate(*hir_crate);
});
+
// Optimise the MIR
CompilePhaseV("MIR Optimise", [&]() {
MIR_OptimiseCrate(*hir_crate);
@@ -459,7 +461,8 @@ int main(int argc, char *argv[])
// > DEBUGGING ONLY
// > DISBALED: Excessive memory usage on complex functions
CompilePhaseV("MIR Validate Full", [&]() {
- //MIR_CheckCrate_Full(*hir_crate);
+ if( getenv("MRUSTC_FULL_VALIDATE") )
+ MIR_CheckCrate_Full(*hir_crate);
});
if( params.last_stage == ProgramParams::STAGE_MIR ) {