diff options
author | nineonine <mail4chemik@gmail.com> | 2019-07-13 00:11:46 -0700 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-07-26 00:57:39 -0400 |
commit | aae0457f412aa40dd192ca2cbea565ea60b182ec (patch) | |
tree | fd58e2a399fd70e0aeaa9e6c9eb7415877776ba3 /compiler/cmm | |
parent | 30b6f391801d58e364f79df5da2cf9f02be2ba5f (diff) | |
download | haskell-aae0457f412aa40dd192ca2cbea565ea60b182ec.tar.gz |
Change behaviour of -ddump-cmm-verbose to dump each Cmm pass output to a separate file and add -ddump-cmm-verbose-by-proc to keep old behaviour (#16930)
Diffstat (limited to 'compiler/cmm')
-rw-r--r-- | compiler/cmm/CmmPipeline.hs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/cmm/CmmPipeline.hs b/compiler/cmm/CmmPipeline.hs index b8ae2b57ab..a6d981a7f9 100644 --- a/compiler/cmm/CmmPipeline.hs +++ b/compiler/cmm/CmmPipeline.hs @@ -353,9 +353,10 @@ dumpGraph dflags flag name g = do dumpWith :: DynFlags -> DumpFlag -> String -> SDoc -> IO () dumpWith dflags flag txt sdoc = do - -- ToDo: No easy way of say "dump all the cmm, *and* split - -- them into files." Also, -ddump-cmm-verbose doesn't play - -- nicely with -ddump-to-file, since the headers get omitted. - dumpIfSet_dyn dflags flag txt sdoc - when (not (dopt flag dflags)) $ - dumpIfSet_dyn dflags Opt_D_dump_cmm_verbose txt sdoc + dumpIfSet_dyn dflags flag txt sdoc + when (not (dopt flag dflags)) $ + -- If `-ddump-cmm-verbose -ddump-to-file` is specified, + -- dump each Cmm pipeline stage output to a separate file. #16930 + when (dopt Opt_D_dump_cmm_verbose dflags) + $ dumpSDoc dflags alwaysQualify flag txt sdoc + dumpIfSet_dyn dflags Opt_D_dump_cmm_verbose_by_proc txt sdoc |