[commit: ghc] master: Fix dataToTag# argument evaluation (ac97768)

git at git.haskell.org git at git.haskell.org
Wed Oct 10 07:33:05 UTC 2018


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

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

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

commit ac977688523e5d77eb6f041f043552410b0c21da
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


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

ac977688523e5d77eb6f041f043552410b0c21da
 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                    | 26 ++++----
 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, 91 insertions(+), 151 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 ac977688523e5d77eb6f041f043552410b0c21da


More information about the ghc-commits mailing list