[GHC] #13426: compile-time memory-usage regression for DynFlags between GHC 8.0 and GHC 8.2
GHC
ghc-devs at haskell.org
Fri Mar 31 12:19:41 UTC 2017
#13426: compile-time memory-usage regression for DynFlags between GHC 8.0 and GHC
8.2
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: rwbarton
Type: bug | Status: new
Priority: high | Milestone: 8.2.1
Component: Compiler | Version: 8.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3399,
Wiki Page: | Phab:D3400
-------------------------------------+-------------------------------------
Comment (by simonpj):
About forcing the type before passing to `mkBoringStop`. Often the type
passed into `mkBoringStop` is discarded unused, so I'd prefer not to force
it when building a `SimplCont`. I'd prefer to force it when getting it
out of the `SimplCont`.
Notably, `contResultType` does that. So, possible alternative plan: when
extracting the `contResultType` can we just force it then? E.g.
{{{
; let alts_ty' = contResultType dup_cont
; case_expr <- mkCase dflags scrut' case_bndr' alts_ty' alts'
}}}
Aha -- you have already added a `seq` there!
Here's another (line 1622 of `Simplify`)
{{{
missingAlt env case_bndr _ cont
= WARN( True, text "missingAlt" <+> ppr case_bndr )
return (env, mkImpossibleExpr (contResultType cont))
}}}
Here want to force that type. Ditto here (line 1656)
{{{
| not (contIsTrivial cont) -- Only do this if there is a non-trivial
= return (env, castBottomExpr res cont_ty) -- continuation to discard,
else we do it
where -- again and again!
res = argInfoExpr fun rev_args
cont_ty = contResultType cont
}}}
But not here (line 1591)
{{{
trim_cont 0 cont
= mkBoringStop (contResultType cont)
}}
because we are just building another `SimplCont`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13426#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list