[commit: ghc] master: PPC NCG: Impl branch prediction, atomic ops. (1130c67)

git at git.haskell.org git at git.haskell.org
Thu Nov 2 17:30:54 UTC 2017


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

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

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

commit 1130c67bbb6dc06f513e5c8705a488a591fabadb
Author: Peter Trommler <ptrommler at acm.org>
Date:   Thu Nov 2 11:57:05 2017 -0400

    PPC NCG: Impl branch prediction, atomic ops.
    
    Implement AtomicRMW ops, atomic read, atomic write
    in PowerPC native code generator. Also implement
    branch prediction because we need it in atomic ops
    anyway.
    
    This patch improves the issue in #12537 a bit but
    does not fix it entirely.
    
    The fallback operations for atomicread and atomicwrite
    in libraries/ghc-prim/cbits/atomic.c are incorrect.
    This patch avoids those functions by implementing the
    operations directly in the native code generator. This
    is also what the x86/amd64 NCG and the LLVM backend
    do.
    
    Test Plan: validate on AIX and PowerPC (32-bit) Linux
    
    Reviewers: erikd, hvr, austin, bgamari, simonmar
    
    Reviewed By: hvr, bgamari
    
    Subscribers: rwbarton, thomie
    
    GHC Trac Issues: #12537
    
    Differential Revision: https://phabricator.haskell.org/D3984


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

1130c67bbb6dc06f513e5c8705a488a591fabadb
 compiler/nativeGen/PPC/CodeGen.hs | 149 ++++++++++++++++++++++++++++++--------
 compiler/nativeGen/PPC/Instr.hs   |  51 ++++++++-----
 compiler/nativeGen/PPC/Ppr.hs     |  62 +++++++++++++---
 3 files changed, 201 insertions(+), 61 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 1130c67bbb6dc06f513e5c8705a488a591fabadb


More information about the ghc-commits mailing list