summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonmar <unknown>2003-11-17 14:47:53 +0000
committersimonmar <unknown>2003-11-17 14:47:53 +0000
commitbf64f2050e84ea4afffe8af993a271a1e8dd5cab (patch)
tree5b5b5e3a6c306f4cf2fe683cee0f0a5c72bfbe69
parent92bda9779666c90849c07e2c468304631089ba63 (diff)
downloadhaskell-bf64f2050e84ea4afffe8af993a271a1e8dd5cab.tar.gz
[project @ 2003-11-17 14:47:52 by simonmar]
GC dead code and export list entries.
-rw-r--r--ghc/compiler/absCSyn/AbsCSyn.lhs7
-rw-r--r--ghc/compiler/basicTypes/NewDemand.lhs10
-rw-r--r--ghc/compiler/coreSyn/CoreTidy.lhs3
-rw-r--r--ghc/compiler/coreSyn/PprCore.lhs4
-rw-r--r--ghc/compiler/specialise/Rules.lhs2
-rw-r--r--ghc/compiler/stgSyn/StgSyn.lhs26
6 files changed, 10 insertions, 42 deletions
diff --git a/ghc/compiler/absCSyn/AbsCSyn.lhs b/ghc/compiler/absCSyn/AbsCSyn.lhs
index 32c086691d..3c8a470aae 100644
--- a/ghc/compiler/absCSyn/AbsCSyn.lhs
+++ b/ghc/compiler/absCSyn/AbsCSyn.lhs
@@ -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}
%************************************************************************
diff --git a/ghc/compiler/basicTypes/NewDemand.lhs b/ghc/compiler/basicTypes/NewDemand.lhs
index 9da7b7e928..4b58fd555d 100644
--- a/ghc/compiler/basicTypes/NewDemand.lhs
+++ b/ghc/compiler/basicTypes/NewDemand.lhs
@@ -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
diff --git a/ghc/compiler/coreSyn/CoreTidy.lhs b/ghc/compiler/coreSyn/CoreTidy.lhs
index c825a6a0aa..093067e87a 100644
--- a/ghc/compiler/coreSyn/CoreTidy.lhs
+++ b/ghc/compiler/coreSyn/CoreTidy.lhs
@@ -9,8 +9,7 @@
\begin{code}
module CoreTidy (
- tidyBind, tidyExpr,
- tidyBndr, tidyBndrs, tidyVarOcc,
+ tidyExpr, tidyVarOcc,
tidyIdRules, pprTidyIdRules
) where
diff --git a/ghc/compiler/coreSyn/PprCore.lhs b/ghc/compiler/coreSyn/PprCore.lhs
index 541231a40a..29a822a6ad 100644
--- a/ghc/compiler/coreSyn/PprCore.lhs
+++ b/ghc/compiler/coreSyn/PprCore.lhs
@@ -9,9 +9,9 @@
\begin{code}
module PprCore (
- pprCoreExpr, pprParendExpr, pprIdBndr,
+ pprCoreExpr, pprParendExpr,
pprCoreBinding, pprCoreBindings, pprCoreAlt,
- pprIdRules, pprCoreRule
+ pprIdRules
) where
#include "HsVersions.h"
diff --git a/ghc/compiler/specialise/Rules.lhs b/ghc/compiler/specialise/Rules.lhs
index 19bced3241..286d357508 100644
--- a/ghc/compiler/specialise/Rules.lhs
+++ b/ghc/compiler/specialise/Rules.lhs
@@ -6,7 +6,7 @@
\begin{code}
module Rules (
RuleBase, emptyRuleBase,
- extendRuleBase, extendRuleBaseList,
+ extendRuleBaseList,
ruleBaseIds, getLocalRules,
pprRuleBase, ruleCheckProgram,
diff --git a/ghc/compiler/stgSyn/StgSyn.lhs b/ghc/compiler/stgSyn/StgSyn.lhs
index 156e8dbada..40fbef753a 100644
--- a/ghc/compiler/stgSyn/StgSyn.lhs
+++ b/ghc/compiler/stgSyn/StgSyn.lhs
@@ -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)