[project @ 2001-03-13 12:50:29 by simonmar]
[ghc-hetmet.git] / ghc / compiler / simplStg / StgStats.lhs
index fc9da5d..e958122 100644 (file)
@@ -27,7 +27,6 @@ module StgStats ( showStgStats ) where
 
 import StgSyn
 
-import Const           ( Con(..) )
 import FiniteMap       ( emptyFM, plusFM_C, unitFM, fmToList, FiniteMap )
 import Id (Id)
 \end{code}
@@ -118,10 +117,10 @@ statBinding :: Bool -- True <=> top-level; False <=> nested
            -> StgBinding
            -> StatEnv
 
-statBinding top (StgNonRec b rhs)
+statBinding top (StgNonRec _srt b rhs)
   = statRhs top (b, rhs)
 
-statBinding top (StgRec pairs)
+statBinding top (StgRec _srt pairs)
   = combineSEs (map (statRhs top) pairs)
 
 statRhs :: Bool -> (Id, StgRhs) -> StatEnv
@@ -129,7 +128,7 @@ statRhs :: Bool -> (Id, StgRhs) -> StatEnv
 statRhs top (b, StgRhsCon cc con args)
   = countOne (ConstructorBinds top)
 
-statRhs top (b, StgRhsClosure cc bi srt fv u args body)
+statRhs top (b, StgRhsClosure cc bi fv u args body)
   = statExpr body                      `combineSE`
     countN FreeVariables (length fv)   `combineSE`
     countOne (
@@ -149,20 +148,11 @@ statRhs top (b, StgRhsClosure cc bi srt fv u args body)
 \begin{code}
 statExpr :: StgExpr -> StatEnv
 
-statExpr (StgApp _ _)
-  = countOne Applications
-
-statExpr (StgCon (DataCon _) as _)
-  = countOne ConstructorApps
-
-statExpr (StgCon (PrimOp _) as _)
-  = countOne PrimitiveApps
-
-statExpr (StgCon (Literal _) as _)
-  = countOne Literals
-
-statExpr (StgSCC l e)
-  = statExpr e
+statExpr (StgApp _ _)      = countOne Applications
+statExpr (StgLit _)        = countOne Literals
+statExpr (StgConApp _ _)    = countOne ConstructorApps
+statExpr (StgPrimApp _ _ _) = countOne PrimitiveApps
+statExpr (StgSCC l e)      = statExpr e
 
 statExpr (StgLetNoEscape lvs_whole lvs_rhss binds body)
   = statBinding False{-not top-level-} binds   `combineSE`