Front end infrastructure for short vector SIMD packs
authorPaul Khuong <pvk@pvk.ca>
Tue, 21 May 2013 19:10:50 +0000 (15:10 -0400)
committerPaul Khuong <pvk@pvk.ca>
Tue, 21 May 2013 19:10:50 +0000 (15:10 -0400)
commitb38f10027f48f657f77b290719da4fec30064e25
tree3e1fbe21fe78bbf7f513c375e44b61332c9f94c6
parentd142a53608173b7de85dd13032315fbdd07198dc
Front end infrastructure for short vector SIMD packs

 * new feature, sb-simd-pack.

 * define a new IR1 type for SIMD packs:
   - (SB!KERNEL:SIMD-PACK [eltype]), where [eltype] is a subtype
     of the plaform-specific SIMD element type universe, or * (default),
     the union of all these possibilities;
   - Element types are always upgraded to the platform's element type
     (small) universe, so we can easily manipulate unions of SIMD-PACK
     types by working in terms of the element types.

 * immediately specify the universe of SIMD pack element types
   (sb!kernel:*simd-pack-element-types*) for x86-64, to ensure
   #!+sb-simd-pack buildability.

 * declare basic functions to create/manipulate SIMD packs:
   - simd-pack-p is the basic type predicate;
   - %simd-pack-tag returns a fixnum tag associated with each SIMD-PACK;
     currently, we suppose it only encodes the element type, as the
     position of the element type in *simd-pack-element-types*;
   - %make-simd-pack creates a 128-bit SIMD pack from a tag and two
     64 bit integers;
   - %make-simd-pack-double creates an appropriately-tagged pack from
     two double floats;
   - %make-simd-pack-single creates a tagged pack from four single
     floats;
   - %make-simd-pack-ub{32,64} creates a tagged pack from four 32 bit
     or two 64 bit integers;
   - %simd-pack-{low,high} returns the low/high integer half of a
     128 bit pack;
   - %simd-pack-ub{32,64}s returns the four integer quarters or two
     integer halves of a 128 bit pack;
   - %simd-pack-singles returns the four singles in a 128 bit pack;
   - %simd-pack-doubles returns the two doubles in a 128 bit pack.

Alexander Gavrilov kept a branch alive for the last couple years. The
creation/manipulation primitives are largely taken from that branch,
or informed by the branch's usage.
base-target-features.lisp-expr
package-data-list.lisp-expr
src/code/class.lisp
src/code/early-type.lisp
src/code/late-type.lisp
src/compiler/generic/vm-fndb.lisp
src/compiler/x86-64/parms.lisp