[commit: ghc] master: StgCse: Do not re-use trivial case scrutinees (b55f310)

git at git.haskell.org git at git.haskell.org
Mon Apr 10 14:13:10 UTC 2017


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

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

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

commit b55f310d06b8d3988d40aaccc0ff13601ee52b84
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun Apr 9 19:40:02 2017 -0400

    StgCse: Do not re-use trivial case scrutinees
    
    as they might be marked as one-shot, and suddenly we’d evaluate them
    multiple times. This came up in #13536 (test cases included).
    
    The solution was layed out by SPJ in ticket:13536#comment:12.
    
    Differential Revision: https://phabricator.haskell.org/D3437


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

b55f310d06b8d3988d40aaccc0ff13601ee52b84
 compiler/simplStg/StgCse.hs                       | 108 +++++++++++-----------
 testsuite/tests/simplStg/should_run/T13536.hs     |  17 ++++
 testsuite/tests/simplStg/should_run/T13536.stderr |   1 +
 testsuite/tests/simplStg/should_run/T13536.stdout |   1 +
 testsuite/tests/simplStg/should_run/all.T         |   1 +
 5 files changed, 75 insertions(+), 53 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 b55f310d06b8d3988d40aaccc0ff13601ee52b84


More information about the ghc-commits mailing list