[project @ 2003-11-17 14:47:52 by simonmar]
authorsimonmar <unknown>
Mon, 17 Nov 2003 14:47:53 +0000 (14:47 +0000)
committersimonmar <unknown>
Mon, 17 Nov 2003 14:47:53 +0000 (14:47 +0000)
GC dead code and export list entries.

ghc/compiler/absCSyn/AbsCSyn.lhs
ghc/compiler/basicTypes/NewDemand.lhs
ghc/compiler/coreSyn/CoreTidy.lhs
ghc/compiler/coreSyn/PprCore.lhs
ghc/compiler/specialise/Rules.lhs
ghc/compiler/stgSyn/StgSyn.lhs

index 32c0866..3c8a470 100644 (file)
@@ -1,7 +1,7 @@
 %
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
-% $Id: AbsCSyn.lhs,v 1.55 2003/07/28 16:05:30 simonmar Exp $
+% $Id: AbsCSyn.lhs,v 1.56 2003/11/17 14:47:53 simonmar Exp $
 %
 \section[AbstractC]{Abstract C: the last stop before machine code}
 
@@ -40,8 +40,6 @@ import FastString
 @AbstractC@ is a list of Abstract~C statements, but the data structure
 is tree-ish, for easier and more efficient putting-together.
 \begin{code}
-absCNop = AbsCNop
-
 data AbstractC
   = AbsCNop
   | AbsCStmts          AbstractC AbstractC
@@ -461,9 +459,6 @@ type HeapOffset = Int                       -- ToDo: remove
 
 type VirtualHeapOffset = HeapOffset
 type VirtualSpOffset   = Int
-
-type HpRelOffset       = HeapOffset
-type SpRelOffset       = Int
 \end{code}
 
 %************************************************************************
index 9da7b7e..4b58fd5 100644 (file)
@@ -10,7 +10,7 @@ module NewDemand(
        isTop, isAbsent, seqDemand,
 
        DmdType(..), topDmdType, botDmdType, mkDmdType, mkTopDmdType, 
-               dmdTypeDepth, dmdTypeRes, seqDmdType,
+               dmdTypeDepth, seqDmdType,
        DmdEnv, emptyDmdEnv,
        DmdResult(..), retCPR, isBotRes, returnsCPR, resTypeArgDmd,
        
@@ -18,7 +18,7 @@ module NewDemand(
 
        StrictSig(..), mkStrictSig, topSig, botSig, cprSig,
         isTopSig,
-       splitStrictSig, strictSigResInfo,
+       splitStrictSig,
        pprIfaceStrictSig, appIsBottom, isBottomingSig, seqStrictSig,
      ) where
 
@@ -242,9 +242,6 @@ mkTopDmdType ds res = DmdType emptyDmdEnv ds res
 
 dmdTypeDepth :: DmdType -> Arity
 dmdTypeDepth (DmdType _ ds _) = length ds
-
-dmdTypeRes :: DmdType -> DmdResult
-dmdTypeRes (DmdType _ _ res_ty) = res_ty
 \end{code}
 
 
@@ -295,9 +292,6 @@ mkStrictSig dmd_ty = StrictSig dmd_ty
 splitStrictSig :: StrictSig -> ([Demand], DmdResult)
 splitStrictSig (StrictSig (DmdType _ dmds res)) = (dmds, res)
 
-strictSigResInfo :: StrictSig -> DmdResult
-strictSigResInfo (StrictSig (DmdType _ _ res)) = res
-
 isTopSig (StrictSig ty) = isTopDmdType ty
 
 topSig, botSig, cprSig :: StrictSig
index c825a6a..093067e 100644 (file)
@@ -9,8 +9,7 @@
 
 \begin{code}
 module CoreTidy (
-       tidyBind, tidyExpr, 
-       tidyBndr, tidyBndrs, tidyVarOcc,
+       tidyExpr, tidyVarOcc,
        tidyIdRules, pprTidyIdRules
     ) where
 
index 541231a..29a822a 100644 (file)
@@ -9,9 +9,9 @@
 
 \begin{code}
 module PprCore (
-       pprCoreExpr, pprParendExpr, pprIdBndr,
+       pprCoreExpr, pprParendExpr,
        pprCoreBinding, pprCoreBindings, pprCoreAlt,
-       pprIdRules, pprCoreRule
+       pprIdRules
     ) where
 
 #include "HsVersions.h"
index 19bced3..286d357 100644 (file)
@@ -6,7 +6,7 @@
 \begin{code}
 module Rules (
        RuleBase, emptyRuleBase, 
-       extendRuleBase, extendRuleBaseList, 
+       extendRuleBaseList, 
        ruleBaseIds, getLocalRules,
        pprRuleBase, ruleCheckProgram,
 
index 156e8db..40fbef7 100644 (file)
@@ -30,12 +30,12 @@ module StgSyn (
        StgOp(..),
 
        -- SRTs
-       SRT(..), noSRT, nonEmptySRT,
+       SRT(..),
 
        -- utils
-       stgBindHasCafRefs,  stgArgHasCafRefs, stgRhsArity, getArgPrimRep, 
+       stgArgHasCafRefs,
        isDllConApp, isStgTypeArg,
-       stgArgType, stgBinders,
+       stgArgType,
 
        pprStgBinding, pprStgBindings, pprStgBindingsWithSRTs
 
@@ -85,10 +85,6 @@ There is one SRT for each group of bindings.
 data GenStgBinding bndr occ
   = StgNonRec  bndr (GenStgRhs bndr occ)
   | StgRec     [(bndr, GenStgRhs bndr occ)]
-
-stgBinders :: GenStgBinding bndr occ -> [bndr]
-stgBinders (StgNonRec b _) = [b]
-stgBinders (StgRec bs)     = map fst bs
 \end{code}
 
 %************************************************************************
@@ -105,9 +101,6 @@ data GenStgArg occ
 \end{code}
 
 \begin{code}
-getArgPrimRep (StgVarArg local) = idPrimRep local
-getArgPrimRep (StgLitArg lit)  = literalPrimRep lit
-
 isStgTypeArg (StgTypeArg _) = True
 isStgTypeArg other         = False
 
@@ -403,19 +396,6 @@ The second flavour of right-hand-side is for constructors (simple but important)
 \end{code}
 
 \begin{code}
-stgRhsArity :: StgRhs -> Int
-stgRhsArity (StgRhsClosure _ _ _ _ _ bndrs _) = count isId bndrs
-  -- The arity never includes type parameters, so
-  -- when keeping type arguments and binders in the Stg syntax 
-  -- (opt_RuntimeTypes) we have to fliter out the type binders.
-stgRhsArity (StgRhsCon _ _ _) = 0
-\end{code}
-
-\begin{code}
-stgBindHasCafRefs :: GenStgBinding bndr Id -> Bool
-stgBindHasCafRefs (StgNonRec _ rhs) = rhsHasCafRefs rhs
-stgBindHasCafRefs (StgRec binds)    = any rhsHasCafRefs (map snd binds)
-
 rhsHasCafRefs (StgRhsClosure _ _ _ upd srt _ _) 
   = isUpdatable upd || nonEmptySRT srt
 rhsHasCafRefs (StgRhsCon _ _ args)