[commit: ghc] ghc-8.2: StgCse: Do not re-use trivial case scrutinees (687e79f)
git at git.haskell.org
git at git.haskell.org
Tue Apr 11 02:21:53 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/687e79fdf3d192cdc16bccb8b28eaec60ebb8abb/ghc
>---------------------------------------------------------------
commit 687e79fdf3d192cdc16bccb8b28eaec60ebb8abb
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
(cherry picked from commit b55f310d06b8d3988d40aaccc0ff13601ee52b84)
>---------------------------------------------------------------
687e79fdf3d192cdc16bccb8b28eaec60ebb8abb
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 687e79fdf3d192cdc16bccb8b28eaec60ebb8abb
More information about the ghc-commits
mailing list