Commit c2bbc8ba authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan
Browse files

Report term sizes with -v3 even when -ddump is enabled

This is the proper fix for the problem I tried solve with D2310
(committed as dd332459 and reverted in 44a3c182).

Reviewers: austin, goldfire, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2315
parent 44a3c182
......@@ -211,13 +211,14 @@ dumpPassResult :: DynFlags
-> CoreProgram -> [CoreRule]
-> IO ()
dumpPassResult dflags unqual mb_flag hdr extra_info binds rules
| Just flag <- mb_flag
= Err.dumpSDoc dflags unqual flag (showSDoc dflags hdr) dump_doc
= do { forM_ mb_flag $ \flag ->
Err.dumpSDoc dflags unqual flag (showSDoc dflags hdr) dump_doc
| otherwise
= Err.debugTraceMsg dflags 2 size_doc
-- Report result size
-- This has the side effect of forcing the intermediate to be evaluated
-- Report result size
-- This has the side effect of forcing the intermediate to be evaluated
-- if it's not already forced by a -ddump flag.
; Err.debugTraceMsg dflags 2 size_doc
}
where
size_doc = sep [text "Result size of" <+> hdr, nest 2 (equals <+> ppr (coreBindsStats binds))]
......
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