[GHC] #13032: Redundant forcing of Given dictionaries

GHC ghc-devs at haskell.org
Thu Jan 4 17:40:56 UTC 2018


#13032: Redundant forcing of Given dictionaries
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.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:"954cbc7c106a20639960f55ebb85c5c972652d41/ghc"
 954cbc7c/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="954cbc7c106a20639960f55ebb85c5c972652d41"
 Drop dead Given bindings in setImplicationStatus

 Trac #13032 pointed out that we sometimes generate unused
 bindings for Givens, and (worse still) we can't always discard
 them later (we don't drop a case binding unless we can prove
 that the scrutinee is non-bottom.

 It looks as if this may be a major reason for the performace
 problems in #14338 (see comment:29).

 This patch fixes the problem at source, by pruning away all the
 dead Givens.  See Note [Delete dead Given evidence bindings]

 Remarkably, compiler allocation falls by 23% in
 perf/compiler/T12227!

 I have not confirmed whether this change actualy helps with
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13032#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list