[commit: ghc] master: Be aware of overlapping global STG registers in CmmSink (#10521) (a2f828a)

git at git.haskell.org git at git.haskell.org
Thu Jun 25 18:26:42 UTC 2015


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

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

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

commit a2f828a370b220839ad9b31a274c0198ef91b7fe
Author: Reid Barton <rwbarton at gmail.com>
Date:   Thu Jun 25 13:53:57 2015 -0400

    Be aware of overlapping global STG registers in CmmSink (#10521)
    
    Summary:
    On x86_64, commit e2f6bbd3a27685bc667655fdb093734cb565b4cf assigned
    the STG registers F1 and D1 the same hardware register (xmm1), and
    the same for the registers F2 and D2, etc. When mixing calls to
    functions involving Float#s and Double#s, this can cause wrong Cmm
    optimizations that assume the F1 and D1 registers are independent.
    
    Reviewers: simonpj, austin
    
    Reviewed By: austin
    
    Subscribers: simonpj, thomie, bgamari
    
    Differential Revision: https://phabricator.haskell.org/D993
    
    GHC Trac Issues: #10521


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

a2f828a370b220839ad9b31a274c0198ef91b7fe
 compiler/cmm/CmmExpr.hs                            | 37 +++++++++++++++-------
 compiler/cmm/CmmSink.hs                            | 15 ++++-----
 compiler/cmm/CmmUtils.hs                           | 36 +++++++++++++++++++++
 compiler/codeGen/StgCmmUtils.hs                    | 16 ++++++----
 includes/stg/MachRegs.h                            |  6 ++++
 testsuite/.gitignore                               |  2 ++
 testsuite/tests/codeGen/should_run/T10521.hs       | 11 +++++++
 testsuite/tests/codeGen/should_run/T10521.stdout   |  1 +
 testsuite/tests/codeGen/should_run/T10521b.hs      | 18 +++++++++++
 .../should_run/{T5747.stdout => T10521b.stdout}    |  0
 testsuite/tests/codeGen/should_run/all.T           |  2 ++
 11 files changed, 117 insertions(+), 27 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 a2f828a370b220839ad9b31a274c0198ef91b7fe


More information about the ghc-commits mailing list