[commit: ghc] master: Support MO_{Add, Sub}IntC and MO_Add2 in the LLVM backend (b1d1c65)

git at git.haskell.org git at git.haskell.org
Sat Jul 4 10:51:35 UTC 2015


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

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

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

commit b1d1c652908ecd7bfcf13cf2e5dd06ac7926992c
Author: Michal Terepeta <michal.terepeta at gmail.com>
Date:   Sat Jul 4 12:52:02 2015 +0200

    Support MO_{Add,Sub}IntC and MO_Add2 in the LLVM backend
    
    This includes:
    
    - Adding new LlvmType called LMStructP that represents an unpacked
      struct (this is necessary since LLVM's instructions the
      llvm.sadd.with.overflow.* return an unpacked struct).
    
    - Modifications to LlvmCodeGen.CodeGen to generate the LLVM
      instructions for the primops.
    
    - Modifications to StgCmmPrim to actually use those three instructions
      if we use the LLVM backend (so far they were only used for NCG).
    
    Test Plan: validate
    
    Reviewers: austin, rwbarton, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie, bgamari
    
    Differential Revision: https://phabricator.haskell.org/D991
    
    GHC Trac Issues: #9430


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

b1d1c652908ecd7bfcf13cf2e5dd06ac7926992c
 compiler/codeGen/StgCmmPrim.hs              | 13 +++--
 compiler/llvmGen/Llvm/AbsSyn.hs             |  8 +++
 compiler/llvmGen/Llvm/PpLlvm.hs             |  7 +++
 compiler/llvmGen/Llvm/Types.hs              | 14 ++++-
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs     | 87 ++++++++++++++++++++++++++++-
 testsuite/tests/primops/should_run/T9430.hs | 75 +++++++++++++++++++++++++
 testsuite/tests/primops/should_run/all.T    |  3 +-
 7 files changed, 198 insertions(+), 9 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 b1d1c652908ecd7bfcf13cf2e5dd06ac7926992c


More information about the ghc-commits mailing list