[GHC] #14566: LiberateCase improvements

GHC ghc-devs at haskell.org
Fri Dec 8 17:20:56 UTC 2017


#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


More information about the ghc-tickets mailing list