[commit: ghc] master: Demand Analyzer: Do not set OneShot information (second try) (0f58d34)

git at git.haskell.org git at git.haskell.org
Wed Apr 6 20:06:07 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0f58d3484d6bd57fa10bf83f0d9b126884027ebf/ghc

>---------------------------------------------------------------

commit 0f58d3484d6bd57fa10bf83f0d9b126884027ebf
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Apr 1 13:11:18 2016 +0200

    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


>---------------------------------------------------------------

0f58d3484d6bd57fa10bf83f0d9b126884027ebf
 compiler/basicTypes/Demand.hs                | 24 ++++++++-
 compiler/simplCore/OccurAnal.hs              | 42 +++++++++++-----
 compiler/specialise/SpecConstr.hs            |  2 +-
 compiler/stranal/DmdAnal.hs                  | 55 ++-------------------
 compiler/stranal/WorkWrap.hs                 | 60 ++++++++++++++++------
 compiler/stranal/WwLib.hs                    | 74 +++++++---------------------
 testsuite/tests/stranal/should_compile/all.T |  2 +-
 7 files changed, 121 insertions(+), 138 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 0f58d3484d6bd57fa10bf83f0d9b126884027ebf


More information about the ghc-commits mailing list