From 419821c7b153c1a05cb59d08c3d93e024aee48e6 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 22 Mar 2011 15:16:52 +0000 Subject: [PATCH] Split out "Raw Cmm" dump to its own flag -ddump-raw-cmm Previously, -ddump-cmmz was used to dump out the "Raw Cmm" right before it gets passed to the backends, as well as all of the intermediate phases in the new code generator. Unfortunately, there are a lot of intermediate phases, which means -ddump-cmmz takes a very long time with -fnew-codegen for large programs, even if you're only interested in the final result. Here we split up -ddump-cmmz into -ddump-cmmz (now exclusively for the new code generator) and -ddump-raw-cmm (for both code generation paths.) The old flag was not documented in the manual, so hopefully not too many people will be surprised by this change. --- compiler/main/DynFlags.hs | 2 ++ compiler/main/HscMain.lhs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 59ce417..1add565 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -113,6 +113,7 @@ data DynFlag -- debugging flags = Opt_D_dump_cmm + | Opt_D_dump_raw_cmm | Opt_D_dump_cmmz | Opt_D_dump_cmmz_pretty | Opt_D_dump_cps_cmm @@ -1222,6 +1223,7 @@ dynamic_flags = [ , Flag "dstg-stats" (NoArg (setDynFlag Opt_StgStats)) , Flag "ddump-cmm" (setDumpFlag Opt_D_dump_cmm) + , Flag "ddump-raw-cmm" (setDumpFlag Opt_D_dump_raw_cmm) , Flag "ddump-cmmz" (setDumpFlag Opt_D_dump_cmmz) , Flag "ddump-cmmz-pretty" (setDumpFlag Opt_D_dump_cmmz_pretty) , Flag "ddump-cps-cmm" (setDumpFlag Opt_D_dump_cps_cmm) diff --git a/compiler/main/HscMain.lhs b/compiler/main/HscMain.lhs index 47bde96..09db7a8 100644 --- a/compiler/main/HscMain.lhs +++ b/compiler/main/HscMain.lhs @@ -898,7 +898,7 @@ hscGenHardCode cgguts mod_summary -- unless certain dflags are on, the identity function ------------------ Code output ----------------------- rawcmms <- cmmToRawCmm cmms - dumpIfSet_dyn dflags Opt_D_dump_cmmz "Raw Cmm" (ppr rawcmms) + dumpIfSet_dyn dflags Opt_D_dump_raw_cmm "Raw Cmm" (ppr rawcmms) (_stub_h_exists, stub_c_exists) <- codeOutput dflags this_mod location foreign_stubs dependencies rawcmms -- 1.7.10.4