[commit: ghc] wip/simd: SIMD primops are now generated using schemas that are polymorphic in width and element type. (288fbb8)
git at git.haskell.org
git at git.haskell.org
Mon Sep 16 07:05:17 CEST 2013
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/simd
Link : http://ghc.haskell.org/trac/ghc/changeset/288fbb88e4f3b156b0cbaab24badc53d7363ef5e/ghc
>---------------------------------------------------------------
commit 288fbb88e4f3b156b0cbaab24badc53d7363ef5e
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.
>---------------------------------------------------------------
288fbb88e4f3b156b0cbaab24badc53d7363ef5e
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 | 519 ++++++++-----------------------
utils/genprimopcode/Lexer.x | 8 +
utils/genprimopcode/Main.hs | 366 +++++++++++++++++-----
utils/genprimopcode/Parser.y | 29 +-
utils/genprimopcode/ParserM.hs | 8 +
utils/genprimopcode/Syntax.hs | 42 ++-
15 files changed, 719 insertions(+), 650 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 288fbb88e4f3b156b0cbaab24badc53d7363ef5e
More information about the ghc-commits
mailing list