[Git][ghc/ghc][master] simplifier: Fix space leak during demand analysis
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Aug 28 18:17:04 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00
simplifier: Fix space leak during demand analysis
The lazy structure (a list) in a strict field in `DmdType` is not fully
forced which leads to a very large thunk build-up.
It seems there is likely still more work to be done here as it seems we
may be trading space usage for work done. For now, this is the right
choice as rather than using all the memory on my computer, compilation
just takes a little bit longer.
See #25196
- - - - -
1 changed file:
- compiler/GHC/Types/Demand.hs
Changes:
=====================================
compiler/GHC/Types/Demand.hs
=====================================
@@ -1913,7 +1913,7 @@ multDmdType :: Card -> DmdType -> DmdType
multDmdType n (DmdType fv args)
= -- pprTrace "multDmdType" (ppr n $$ ppr fv $$ ppr (multDmdEnv n fv)) $
DmdType (multDmdEnv n fv)
- (map (multDmd n) args)
+ (strictMap (multDmd n) args)
peelFV :: DmdType -> Var -> (DmdType, Demand)
peelFV (DmdType fv ds) id = -- pprTrace "rfv" (ppr id <+> ppr dmd $$ ppr fv)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3a5bebf85071f36c0b81cf888df5f5af27f70ee9
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3a5bebf85071f36c0b81cf888df5f5af27f70ee9
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240828/56e00154/attachment-0001.html>
More information about the ghc-commits
mailing list