[GHC] #11770: Demand analysis: Wrong one-shot annotation due to fixed-point iteration

GHC ghc-devs at haskell.org
Wed Apr 6 20:05:58 UTC 2016


#11770: Demand analysis: Wrong one-shot annotation due to fixed-point iteration
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:
            Type:  bug               |               Status:  patch
        Priority:  normal            |            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:D2085
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Joachim Breitner <mail@…>):

 In [changeset:"0f58d3484d6bd57fa10bf83f0d9b126884027ebf/ghc"
 0f58d348/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="0f58d3484d6bd57fa10bf83f0d9b126884027ebf"
 Demand Analyzer: Do not set OneShot information (second try)

 as suggested in ticket:11770#comment:1. This code was buggy
 (#11770), and the occurrence analyzer does the same job anyways.

 This also elaborates the notes in the occurrence analyzer accordingly.

 Previously, the worker/wrapper code would go through lengths to transfer
 the oneShot annotations from the original function to both the worker
 and the wrapper. We now simply transfer the demand on the worker, and
 let the subsequent occurrence analyzer push this onto the lambda
 binders.

 This also requires the occurrence analyzer to do this more reliably.
 Previously, it would not hand out OneShot annotatoins to things that
 would not `certainly_inline` (and it might not have mattered, as the
 Demand Analysis might have handed out the annotations). Now we hand out
 one-shot annotations unconditionally.

 Differential Revision: https://phabricator.haskell.org/D2085
 }}}

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


More information about the ghc-tickets mailing list