[commit: ghc] wip/simd: SIMD primops are now generated using schemas that are polymorphic in width and element type. (16b350a)

git at git.haskell.org git at git.haskell.org
Mon Sep 23 06:12:41 CEST 2013


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

On branch  : wip/simd
Link       : http://ghc.haskell.org/trac/ghc/changeset/16b350a4227c96e09533c6f165895f50003d3801/ghc

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

commit 16b350a4227c96e09533c6f165895f50003d3801
Author: Geoffrey Mainland <gmainlan at microsoft.com>
Date:   Wed Aug 21 16:18:24 2013 +0100

    SIMD primops are now generated using schemas that are polymorphic in
    width and element type.
    
    SIMD primops are now polymorphic in vector size and element type, but
    only internally to the compiler. More specifically, utils/genprimopcode
    has been extended so that it "knows" about SIMD vectors. This allows us
    to, for example, write a single definition for the "add two vectors"
    primop in primops.txt.pp and have it instantiated at many vector types.
    This generates a primop in GHC.Prim for each vector type at which "add
    two vectors" is instantiated, but only one data constructor for the
    PrimOp data type, so the code generator is much, much simpler.


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

16b350a4227c96e09533c6f165895f50003d3801
 compiler/cmm/CmmMachOp.hs               |   10 +
 compiler/cmm/PprC.hs                    |    9 +
 compiler/codeGen/StgCmmPrim.hs          |  288 +++++++++--------
 compiler/ghc.mk                         |   16 +-
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs |    6 +
 compiler/nativeGen/X86/CodeGen.hs       |    2 +
 compiler/prelude/PrelNames.lhs          |   15 +-
 compiler/prelude/PrimOp.lhs             |   11 +-
 compiler/prelude/TysPrim.lhs            |   40 +--
 compiler/prelude/primops.txt.pp         |  518 ++++++++-----------------------
 utils/genprimopcode/Lexer.x             |    8 +
 utils/genprimopcode/Main.hs             |  373 +++++++++++++++++-----
 utils/genprimopcode/Parser.y            |   29 +-
 utils/genprimopcode/ParserM.hs          |    8 +
 utils/genprimopcode/Syntax.hs           |   42 ++-
 15 files changed, 723 insertions(+), 652 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 16b350a4227c96e09533c6f165895f50003d3801



More information about the ghc-commits mailing list