Commit 419821c7 authored by Edward Z. Yang's avatar Edward Z. Yang

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.
parent 3e3498ad
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment