[commit: ghc] ghc-8.6: Fix dataToTag# argument evaluation (b11126f)

git at git.haskell.org git at git.haskell.org
Tue Oct 16 15:46:15 UTC 2018


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

On branch  : ghc-8.6
Link       : http://ghc.haskell.org/trac/ghc/changeset/b11126fc356ad6b02486a6e48101ff662fc773db/ghc

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

commit b11126fc356ad6b02486a6e48101ff662fc773db
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Wed Oct 10 10:07:05 2018 +0300

    Fix dataToTag# argument evaluation
    
    See #15696 for more details. We now always enter dataToTag# argument (done in
    generated Cmm, in StgCmmExpr). Any high-level optimisations on dataToTag#
    applications are done by the simplifier. Looking at tag bits (instead of
    reading the info table) for small types is left to another diff.
    
    Incorrect test T14626 is removed. We no longer do this optimisation (see
    comment:44, comment:45, comment:60).
    
    Comments and notes about special cases around dataToTag# are removed. We no
    longer have any special cases around it in Core.
    
    Other changes related to evaluating primops (seq# and dataToTag#) will be
    pursued in follow-up diffs.
    
    Test Plan: Validates with three regression tests
    
    Reviewers: simonpj, simonmar, hvr, bgamari, dfeuer
    
    Reviewed By: simonmar
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15696
    
    Differential Revision: https://phabricator.haskell.org/D5201
    
    (cherry picked from commit ac977688523e5d77eb6f041f043552410b0c21da)


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

b11126fc356ad6b02486a6e48101ff662fc773db
 compiler/codeGen/StgCmmExpr.hs                     | 12 ++++
 compiler/codeGen/StgCmmPrim.hs                     |  6 --
 compiler/coreSyn/CorePrep.hs                       | 71 ++--------------------
 compiler/coreSyn/CoreUtils.hs                      | 17 ------
 compiler/prelude/PrelRules.hs                      | 13 ----
 compiler/prelude/PrimOp.hs                         |  1 -
 compiler/prelude/primops.txt.pp                    | 49 +++++++--------
 libraries/base/GHC/Base.hs                         | 11 +---
 testsuite/tests/codeGen/should_compile/Makefile    |  3 -
 testsuite/tests/codeGen/should_compile/T14626.hs   | 15 -----
 testsuite/tests/codeGen/should_compile/all.T       |  3 -
 testsuite/tests/codeGen/should_run/T15696_1.hs     | 26 ++++++++
 testsuite/tests/codeGen/should_run/T15696_1.stdout |  1 +
 testsuite/tests/codeGen/should_run/T15696_2.hs     | 17 ++++++
 .../should_run/T15696_2.stdout}                    |  0
 testsuite/tests/codeGen/should_run/T15696_3.hs     |  9 +++
 testsuite/tests/codeGen/should_run/T15696_3.stdout |  1 +
 testsuite/tests/codeGen/should_run/all.T           | 10 ++-
 18 files changed, 102 insertions(+), 163 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 b11126fc356ad6b02486a6e48101ff662fc773db


More information about the ghc-commits mailing list