Slava Pestov
366c341c5f
compiler.tree.propagation.branches: fix live-branches computation for #dispatch nodes
2009-10-10 00:23:50 -05:00
Joe Groff
471c86a110
generate better code for vabs when instruction isn't available instead of using software fallback (-0.0 andn for floats, x > 0 ? x : -x for signed ints, nop for unsigned ints)
2009-10-09 14:24:55 -05:00
Joe Groff
01f5d392be
implement vneg as an intrinsic in terms of load -0, subtract
2009-10-09 13:16:39 -05:00
Daniel Ehrenberg
bb93543054
Another identity in value numbering for bitfields
2009-10-08 15:20:42 -05:00
Daniel Ehrenberg
eb31589092
Adding identity to propagation to remove some redundant bitands
2009-10-08 00:59:15 -05:00
Joe Groff
785f8620fd
glue conversion intrinsics to instructions
2009-10-06 20:13:38 -05:00
Joe Groff
fbe810fc3b
rename SIMD vmerge and kids to (vmerge), make new vmerge more generally useful
2009-10-05 17:55:39 -05:00
Joe Groff
0c9c3d4859
add %merge-vector-head and %merge-vector-tail instructions to back vmerge
2009-10-03 21:48:53 -05:00
Joe Groff
04bb03bb61
add intrinsics for v<=, v<, v=, v>, v>=, vunordered?
2009-10-03 11:29:34 -05:00
Joe Groff
38f413a8a6
add intrinsic for vnot/vbitnot
2009-10-02 20:04:28 -05:00
Joe Groff
aa3392e50f
implement vand, vor, vandn, and vxor as bitwise intrinsics for simd types
2009-10-02 14:17:01 -05:00
Joe Groff
d14f150b58
%test-vector instruction for vany?, vall?, vnone?
2009-10-01 15:35:38 -05:00
Joe Groff
987ced4070
%compare-vector instruction (only does v= for now)
2009-10-01 14:31:37 -05:00
Joe Groff
a93f8f66f9
Revert "add a %blend-vector intrinsic for v?"
...
This reverts commit 21e4b28b67
.
2009-09-30 23:40:37 -05:00
Joe Groff
7db7b63552
add a %blend-vector intrinsic for v?
2009-09-30 23:03:59 -05:00
Slava Pestov
80e84a357d
math.vectors.simd: add vbroadcast intrinsic, fix integer overflow issues
2009-09-29 22:58:20 -05:00
Slava Pestov
f395d83379
math.vectors.simd: add fast intrinsic for 'nth', replace broadcast primitive with shuffles
2009-09-29 04:48:11 -05:00
Slava Pestov
e40a95c1e1
math.vectors.simd: add vshuffle intrinsic
2009-09-28 23:12:13 -05:00
Slava Pestov
530accdad9
io.mmap: fix obsolete tests and get code to inline better
2009-09-28 03:18:27 -05:00
Slava Pestov
b2ea3afd84
math.vectors.simd: add hlshift, hrshift (128-bit shift), vbitandn intrinsics
2009-09-28 02:17:46 -05:00
Slava Pestov
bbbb207dab
Some fixes and cleanups in math.vectors
...
- Tighten up type inference for operations on complex float arrays
- Fix v. to have correct behavior with complex numbers
- Rename v<< and v>> to vlshift and vrshift to avoid clashing with v>> accessor
2009-09-24 06:58:33 -05:00
Slava Pestov
7ea8832556
Tweaks to reduce deployed image size
2009-09-24 06:24:43 -05:00
Slava Pestov
7b6128dd03
math.vectors.simd: add v<< and v>> intrinsics for bitwise shifts on elements
2009-09-24 03:32:39 -05:00
Slava Pestov
43fa252af5
math.vectors.simd: new operations: vabs vsqrt vbitand vbitor vbitxor
2009-09-23 02:47:14 -05:00
Slava Pestov
d23826906f
Merge branch 'master' into integer-simd
2009-09-22 20:21:40 -05:00
Slava Pestov
7cfc63af51
compiler.tree.propagation.branches: M: #phi propagate-around was unnecessary
2009-09-22 17:56:50 -05:00
Daniel Ehrenberg
45ba559ce4
Merge branch 'master' of git://factorcode.org/git/factor into constraints
2009-09-22 16:09:33 -05:00
Daniel Ehrenberg
6e936bdb05
Fixing failing unit tests in compiler.tree.propagation due to constraints
2009-09-22 16:01:14 -05:00
Slava Pestov
0f0bf667b5
Merge branch 'master' of git://factorcode.org/git/factor into integer-simd
2009-09-21 17:58:24 -05:00
Slava Pestov
962d039852
Rename specific-method to method-for-class, rename (effective-method) to method-for-object, and make both much faster
2009-09-21 17:42:20 -05:00
Slava Pestov
ea44ea3522
math.vectors.simd: add saturated arithmetic operations
2009-09-20 23:16:02 -05:00
Slava Pestov
acea55c692
math.vectors: add v+- word which is accelerated by SSE3
2009-09-20 17:43:16 -05:00
Slava Pestov
47d8763340
More integer SIMD work
...
- move generated vocab support from specialized-arrays to vocabs.generated
- add fuzz testing to math.vectors.simd
- add alien type support for integer SIMD vectors
- SIMD: parsing word generates a SIMD type, instead of pre-generating them all in math.vectors.simd
2009-09-20 16:48:17 -05:00
Joe Groff
01d2ef415a
get compiler tests loading
2009-09-16 09:20:47 -05:00
Slava Pestov
172219e931
compiler.tree.propagation: fix unary-op type functions with complex number inputs
2009-09-15 14:30:20 -07:00
Slava Pestov
32b95c2cdf
math: add unordered comparison operators u< u<= u> u>= which behave exactly like < <= > >= except no floating point exceptions are set if one or both inputs are NaNs; also add efficient intrinsic for unordered? predicate, and fix propagation type functions for abs, absq, and bitnot
2009-09-12 22:20:13 -05:00
Slava Pestov
dd661edf46
compiler.tree.propagation: convert /i of a positive integer by a power of two into a shift
2009-09-11 21:03:11 -05:00
Slava Pestov
7f2e2b1777
Specialized array overhaul
...
- Replace hand-written specialized-arrays.* subvocabularies with new system; instead of USE:ing specialized-arrays.T, do SPECIALIZED-ARRAY: T
- Ditto for specialized-vectors; use SPECIALIZED-VECTOR:
- io.mmap.functor: removed entirely, use <mapped-array> instead
- struct-arrays and struct-vectors have been removed because specialized arrays and vectors subsume them entirely
2009-09-09 22:33:34 -05:00
Slava Pestov
a0e1af5891
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-08 14:22:52 -05:00
Slava Pestov
1e5bc3b376
inline alien-vector and set-alien-vector if SIMD is not available for a small speedup
2009-09-08 13:56:17 -05:00
Doug Coleman
942fb7b048
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-08 13:22:52 -05:00
Slava Pestov
bbca00e2ae
Fix conflicts
2009-09-07 23:51:25 -05:00
Slava Pestov
9f9b6bca01
compiler.tree.propagation: type check inputs to unsafe foldable words manually, so that stuff like [ "Hi" { } fixnum+fast ] doesn't crash in the compiler
2009-09-07 23:40:23 -05:00
Slava Pestov
a1ae209f81
compiler.tree.propagation.call-effect: stronger call( inlining; now can inline 'a [ b ] curry call(' where 'a' is literal, [ b ] doesn't infer, but [ a b ] does infer. This simplifies classes.struct:memory>struct
2009-09-07 17:45:03 -05:00
Slava Pestov
e36a0d7ef4
compiler: clean up code generation for alien boxing/unboxing a bit
2009-09-03 21:22:43 -05:00
Slava Pestov
4d5a4222b6
More SIMD work
...
- Rename SIMD types and register representations: <type>-<count> rather than <count><type>-array
- Make a functor to define 256-bit vector types, use it to define float-8 type
- Make SIMD instructions pure-insns so that they participate in value numbering
2009-09-03 20:58:56 -05:00
Slava Pestov
bf81cb4259
math.vectors.simd: split off intrinsics into a sub-vocabulary, to avoid loading most of the SIMD code on bootstrap
2009-09-03 03:43:43 -05:00
Slava Pestov
ae051e0c9a
compiler.tree.propagation: type function for clone had an issue, sometimes clone would get optimized out because of incorrect constant folding
2009-09-03 02:40:18 -05:00
Slava Pestov
ff8c70dbe0
Initial implementation of SSE vector intrinsics:
...
- cpu.architecture: add SSE vector representations
- compiler.cfg.intrinsics.alien: remove an attempt at optimization that value numbering handles now
- compiler.cfg.representations: support instructions where the representation is set in the 'rep' slot, and support conversions between single and double floats
- alien-float, set-alien-float now use the single float representation, and the conversion is implicit; this fixes a long-standing bug where a register could get clobbered because of how %set-alien-float was defined on x86
- math.vectors.specialization: add support for SIMD specialization (where the vector word's body is replaced by another quotation), also specialize the 'sum' word
- math.vectors.simd: 4float-array, 2double-array, 4double-array types, and specializers for the math.vectors words
2009-09-03 02:33:07 -05:00
Slava Pestov
2bb6293217
compiler: add fixnum-min/max intrinsics; ~10% speedup on benchmark.yuv-to-rgb
2009-08-28 19:02:59 -05:00