[commit: ghc] master: Desugar: Display resulting program stats with -v2 (dd33245)

git at git.haskell.org git at git.haskell.org
Wed Jun 8 08:43:50 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/dd33245922a9d363bdb8c34d00ed4d1574bc5285/ghc

>---------------------------------------------------------------

commit dd33245922a9d363bdb8c34d00ed4d1574bc5285
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Wed Jun 8 04:47:05 2016 -0400

    Desugar: Display resulting program stats with -v2
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2310


>---------------------------------------------------------------

dd33245922a9d363bdb8c34d00ed4d1574bc5285
 compiler/deSugar/Desugar.hs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/compiler/deSugar/Desugar.hs b/compiler/deSugar/Desugar.hs
index 7ce0c6d..4ba9b6a 100644
--- a/compiler/deSugar/Desugar.hs
+++ b/compiler/deSugar/Desugar.hs
@@ -31,6 +31,7 @@ import Class
 import Avail
 import CoreSyn
 import CoreFVs( exprsSomeFreeVarsList )
+import CoreStats   ( coreBindsStats )
 import CoreSubst
 import PprCore
 import DsMonad
@@ -389,6 +390,11 @@ deSugar hsc_env
                 mg_safe_haskell = safe_mode,
                 mg_trust_pkg    = imp_trust_own_pkg imports
               }
+
+        ; debugTraceMsg dflags 2 $
+            sep [ text "Result size of Desugar"
+                , nest 2 (equals <+> ppr (coreBindsStats ds_binds)) ]
+
         ; return (msgs, Just mod_guts)
         }}}}
 



More information about the ghc-commits mailing list