[GHC] #11564: Possible overzealous unfolding

GHC ghc-devs at haskell.org
Thu Feb 11 14:55:38 UTC 2016


#11564: Possible overzealous unfolding
-------------------------------------+-------------------------------------
        Reporter:  simonmar          |                Owner:  simonpj
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:
       Component:  Compiler          |              Version:  8.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):  Phab:D1900
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Marlow <marlowsd@…>):

 In [changeset:"51a33924fc118d9b6c1db556c75c0d010ef95e18/ghc" 51a3392/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="51a33924fc118d9b6c1db556c75c0d010ef95e18"
 sizeExpr: fix a bug in the size calculation

 There were two bugs here:

 * We weren't ignoring Cast in size_up_app
 * An application of a non-variable wasn't being charged correct

 The result was that some things looked too cheap.  In my case I had
 things like

     ((f x) `cast` ...) y

 which was given size 21 instead of 30, and this had knock-on effects
 elsewhere that caused some large code bloat.

 Test Plan:
 * nofib runs (todo)
 * validate

 Reviewers: simonpj, austin, bgamari, erikd

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D1900

 GHC Trac Issues: #11564
 }}}

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


More information about the ghc-tickets mailing list