
Simon Peyton Jones pushed to branch wip/T23109a at Glasgow Haskell Compiler / GHC Commits: 1dd04c7f by Simon Peyton Jones at 2025-05-26T17:33:30+01:00 Buglet in continuation duplication Need to account for strict demand; makes a difference to T19695 - - - - - 1 changed file: - compiler/GHC/Core/Opt/Simplify/Iteration.hs Changes: ===================================== compiler/GHC/Core/Opt/Simplify/Iteration.hs ===================================== @@ -3923,9 +3923,12 @@ mkDupableContWithDmds env df dmds -- it, then postInlineUnconditionally will just inline it again, perhaps -- taking an extra Simplifier iteration (e.g. in test T21839c). So make -- a `let` only if `couldBeSmallEnoughToInline` says that it is big enough + -- NB: postInlineUnconditionally does not fire on strict demands, + -- so account for that too ; let uf_opts = seUnfoldingOpts env ; (let_floats2, arg'') - <- if couldBeSmallEnoughToInline uf_opts (unfoldingUseThreshold uf_opts) arg' + <- if not (isStrUsedDmd dmd) && + couldBeSmallEnoughToInline uf_opts (unfoldingUseThreshold uf_opts) arg' then return (emptyLetFloats, arg') else makeTrivial env NotTopLevel dmd (fsLit "karg") arg' View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1dd04c7f8e4272389c0fab21eeea1a09... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1dd04c7f8e4272389c0fab21eeea1a09... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Peyton Jones (@simonpj)