[Git][ghc/ghc][wip/andreask/cpr-dependent] Limit recursive constructors to depth 1
Andreas Klebinger (@AndreasK)
gitlab at gitlab.haskell.org
Tue Feb 21 14:34:55 UTC 2023
Andreas Klebinger pushed to branch wip/andreask/cpr-dependent at Glasgow Haskell Compiler / GHC
Commits:
9b1af896 by Andreas Klebinger at 2023-02-21T15:34:26+01:00
Limit recursive constructors to depth 1
- - - - -
1 changed file:
- compiler/GHC/Core/Opt/CprAnal.hs
Changes:
=====================================
compiler/GHC/Core/Opt/CprAnal.hs
=====================================
@@ -401,7 +401,7 @@ cprTransformDataConWork env con args
in
if rec_con
then CprType 0 (ConCpr tag nested_cpr )
- else CprType 0 (ConCpr tag $ map (trimCprToDepth 3) nested_cpr )
+ else CprType 0 (ConCpr tag $ map (trimCprToDepth 1) nested_cpr )
| otherwise
=
@@ -428,7 +428,7 @@ cprTransformDataConWork env con args
-- pprTrace "exprTerms"
-- (ppr arg $$
-- ppr (exprTerminates arg))
- cpr
+ -- cpr
extract_nested_cpr _ _ = topCpr -- intervening lambda or doesn't terminate
-- | See Note [Trimming to mAX_CPR_SIZE].
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9b1af896346cc36115f5704f8e207e23382d63e6
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9b1af896346cc36115f5704f8e207e23382d63e6
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/20230221/c990f1b0/attachment-0001.html>
More information about the ghc-commits
mailing list