Changes between Version 6 and Version 7 of SimdLlvm

Oct 5, 2011 11:42:28 AM (6 years ago)



  • SimdLlvm

    v6 v7  
    3333As we do not want to support SIMD instructions in the native code generator, we set the query functions for vector lengths (`vecInt16Len`, `vecFloatLen`, and so on) to be 1 for all vector types when we compile with the native code generator.  Then, all vector types and operations on vector types can be trivially implemented with conventional instructions. (We use the same approach to handle scalar data types that are not supported by SIMD instructions on a particular architecture.)
     36== API ==
    3539== Using SIMD instructions in DPH ==
     41In DPH, we will use the new SIMD instructions by suitably modifying the definition of the lifted versions of arithmetic and other operations that we would like to accelerate. These lifted operations are defined in the `dph-common` package and made accessible to the vectoriser via [wiki:DataParallel/VectPragma VECTORISE pragmas]. Many of them currently use `VECTORISE SCALAR` pragmas, such as
     43(+) :: Int -> Int -> Int
     44(+) = (P.+)
     45{-# VECTORISE SCALAR (+) #-}
     47We could define them more verbosely using a plain `VECTORISE` pragma, but might instead like to extend `VECTORISE SCALAR` or introduce a variant.
     49'''NB:''' The use of SIMD instructions interferes with vectorisation avoidance for scalar subcomputations. Code that avoids vectorisation also avoids the use of SIMD instructions. We would like to use SIMD instructions, but still avoid full-scale vectorisation. This should be possible, but it is not immediately clear how to realise it (elegantly).