• gmainlan@microsoft.com's avatar
    SIMD primops are now generated using schemas that are polymorphic in · 16b350a4
    gmainlan@microsoft.com authored
    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.
    16b350a4
ghc.mk 29.1 KB