summaryrefslogtreecommitdiff
path: root/compiler/simplStg
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2018-11-12 06:50:54 +0300
committerÖmer Sinan Ağacan <omeragacan@gmail.com>2018-11-12 06:51:49 +0300
commitd30352add1da67dd0346613853cd423c7becbaeb (patch)
tree634126b59821c7b6b27cd00fc3fa287811d86b25 /compiler/simplStg
parent13ff0b7ced097286e0d7b054f050871effe07f86 (diff)
downloadhaskell-d30352add1da67dd0346613853cd423c7becbaeb.tar.gz
Remove StgBinderInfo and related computation in CoreToStg
- The StgBinderInfo type was never used in the code gen, so the type, related computation in CoreToStg, and some comments about it are removed. See #15770 for more details. - Simplified CoreToStg after removing the StgBinderInfo computation: removed StgBinderInfo arguments and mfix stuff. The StgBinderInfo values were not used in the code gen, but I still run nofib just to make sure: 0.0% change in allocations and binary sizes. Test Plan: Validated locally Reviewers: simonpj, simonmar, bgamari, sgraf Reviewed By: sgraf Subscribers: AndreasK, sgraf, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5232
Diffstat (limited to 'compiler/simplStg')
-rw-r--r--compiler/simplStg/StgCse.hs8
-rw-r--r--compiler/simplStg/StgStats.hs2
-rw-r--r--compiler/simplStg/UnariseStg.hs4
3 files changed, 7 insertions, 7 deletions
diff --git a/compiler/simplStg/StgCse.hs b/compiler/simplStg/StgCse.hs
index 2caf006e3f..fe7943c7d8 100644
--- a/compiler/simplStg/StgCse.hs
+++ b/compiler/simplStg/StgCse.hs
@@ -284,9 +284,9 @@ stgCseTopLvl in_scope (StgTopLifted (StgRec eqs))
where in_scope' = in_scope `extendInScopeSetList` [ bndr | (bndr, _) <- eqs ]
stgCseTopLvlRhs :: InScopeSet -> InStgRhs -> OutStgRhs
-stgCseTopLvlRhs in_scope (StgRhsClosure ccs info occs upd args body)
+stgCseTopLvlRhs in_scope (StgRhsClosure ccs occs upd args body)
= let body' = stgCseExpr (initEnv in_scope) body
- in StgRhsClosure ccs info occs upd args body'
+ in StgRhsClosure ccs occs upd args body'
stgCseTopLvlRhs _ (StgRhsCon ccs dataCon args)
= StgRhsCon ccs dataCon args
@@ -402,11 +402,11 @@ stgCseRhs env bndr (StgRhsCon ccs dataCon args)
pair = (bndr, StgRhsCon ccs dataCon args')
in (Just pair, env')
where args' = substArgs env args
-stgCseRhs env bndr (StgRhsClosure ccs info occs upd args body)
+stgCseRhs env bndr (StgRhsClosure ccs occs upd args body)
= let (env1, args') = substBndrs env args
env2 = forgetCse env1 -- See note [Free variables of an StgClosure]
body' = stgCseExpr env2 body
- in (Just (substVar env bndr, StgRhsClosure ccs info occs' upd args' body'), env)
+ in (Just (substVar env bndr, StgRhsClosure ccs occs' upd args' body'), env)
where occs' = substVars env occs
diff --git a/compiler/simplStg/StgStats.hs b/compiler/simplStg/StgStats.hs
index 712ec2d22e..c548d80707 100644
--- a/compiler/simplStg/StgStats.hs
+++ b/compiler/simplStg/StgStats.hs
@@ -131,7 +131,7 @@ statRhs :: Bool -> (Id, StgRhs) -> StatEnv
statRhs top (_, StgRhsCon _ _ _)
= countOne (ConstructorBinds top)
-statRhs top (_, StgRhsClosure _ _ fv u _ body)
+statRhs top (_, StgRhsClosure _ fv u _ body)
= statExpr body `combineSE`
countN FreeVariables (length fv) `combineSE`
countOne (
diff --git a/compiler/simplStg/UnariseStg.hs b/compiler/simplStg/UnariseStg.hs
index 5c271c2ea0..a46497452f 100644
--- a/compiler/simplStg/UnariseStg.hs
+++ b/compiler/simplStg/UnariseStg.hs
@@ -281,11 +281,11 @@ unariseBinding rho (StgRec xrhss)
= StgRec <$> mapM (\(x, rhs) -> (x,) <$> unariseRhs rho rhs) xrhss
unariseRhs :: UnariseEnv -> StgRhs -> UniqSM StgRhs
-unariseRhs rho (StgRhsClosure ccs b_info fvs update_flag args expr)
+unariseRhs rho (StgRhsClosure ccs fvs update_flag args expr)
= do (rho', args1) <- unariseFunArgBinders rho args
expr' <- unariseExpr rho' expr
let fvs' = unariseFreeVars rho fvs
- return (StgRhsClosure ccs b_info fvs' update_flag args1 expr')
+ return (StgRhsClosure ccs fvs' update_flag args1 expr')
unariseRhs rho (StgRhsCon ccs con args)
= ASSERT(not (isUnboxedTupleCon con || isUnboxedSumCon con))