[commit: ghc] master: Save a word in the info table on x86_64 (2b0918c)

git at git.haskell.org git at git.haskell.org
Wed May 16 12:36:36 UTC 2018


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

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

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

commit 2b0918c9834be1873728176e4944bec26271234a
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Sun Apr 22 14:28:47 2018 +0100

    Save a word in the info table on x86_64
    
    Summary:
    An info table with an SRT normally looks like this:
    
        StgWord64 srt_offset
        StgClosureInfo layout
        StgWord32 layout
        StgWord32 has_srt
    
    But we only need 32 bits for srt_offset on x86_64, because the small
    memory model requires that code segments are at most 2GB. So we can
    optimise this to
    
        StgClosureInfo layout
        StgWord32 layout
        StgWord32 srt_offset
    
    saving a word.  We can tell whether the info table has an SRT or not,
    because zero is not a valid srt_offset, so zero still indicates that
    there's no SRT.
    
    Test Plan:
    * validate
    * For results, see D4632.
    
    Reviewers: bgamari, niteria, osa1, erikd
    
    Subscribers: thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4634


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

2b0918c9834be1873728176e4944bec26271234a
 compiler/cmm/CmmBuildInfoTables.hs   | 23 ++++++++++++-----
 compiler/cmm/CmmExpr.hs              | 12 ++++++---
 compiler/cmm/CmmInfo.hs              | 44 ++++++++++++++++++++++-----------
 includes/rts/storage/ClosureMacros.h |  2 +-
 includes/rts/storage/InfoTables.h    | 48 +++++++++++++++++++++++++++++-------
 libraries/ghci/GHCi/InfoTable.hsc    |  4 +--
 rts/RtsAPI.c                         |  2 +-
 rts/sm/Evac.c                        |  4 +--
 rts/sm/Scav.c                        |  6 ++---
 9 files changed, 102 insertions(+), 43 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 2b0918c9834be1873728176e4944bec26271234a


More information about the ghc-commits mailing list