[GHC] #14566: LiberateCase improvements
#14566: LiberateCase improvements -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I was looking at the result of compiling `base:Data/Typeable/Internal`. It has a fairly large top-level recursive group of functions, involving `mkTrApp`. In doing so I noticed that `LiberateCase` was duplicating the entire top-level blob at a call of a function that was actually just a call to `error`. Totally nuts. This ticket tracks the problem. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14566> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14566: LiberateCase improvements -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"800009d9b78a9b2877e7efc889e8a0b21873990d/ghc" 800009d9/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="800009d9b78a9b2877e7efc889e8a0b21873990d" Improve LiberateCase This patch, which fixes Trac #14566, makes LiberateCase a little more conservative. In particular: * In libCaseBind, treat a recursive group as a whole, rather than binding-by-binding, allowing the group to be duplicated only if - the bindings /considered together/ are smaller than the liberate-case threshold (which is large by default) - none of them are thunks - none of them are guaranteed-diverging The latter condidtion is new, and happens to apply in the case of Data/Typeable/Internal.mkTrApp }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14566#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14566: LiberateCase improvements -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14566#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC