inline alien-vector and set-alien-vector if SIMD is not available for a small speedup
parent
82a8ef7beb
commit
1e5bc3b376
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
! Copyright (C) 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors byte-arrays combinators
|
USING: accessors byte-arrays combinators fry
|
||||||
compiler.tree.propagation.info cpu.architecture kernel words math
|
compiler.tree.propagation.info cpu.architecture kernel words math
|
||||||
math.intervals math.vectors.simd.intrinsics ;
|
math.intervals math.vectors.simd.intrinsics ;
|
||||||
IN: compiler.tree.propagation.simd
|
IN: compiler.tree.propagation.simd
|
||||||
|
@ -40,3 +40,13 @@ IN: compiler.tree.propagation.simd
|
||||||
] "outputs" set-word-prop
|
] "outputs" set-word-prop
|
||||||
|
|
||||||
\ alien-vector { byte-array } "default-output-classes" set-word-prop
|
\ alien-vector { byte-array } "default-output-classes" set-word-prop
|
||||||
|
|
||||||
|
! If SIMD is not available, inline alien-vector and set-alien-vector
|
||||||
|
! to get a speedup
|
||||||
|
: inline-unless-intrinsic ( word -- )
|
||||||
|
dup '[ drop _ dup "intrinsic" word-prop [ drop f ] [ def>> ] if ]
|
||||||
|
"custom-inlining" set-word-prop ;
|
||||||
|
|
||||||
|
\ alien-vector inline-unless-intrinsic
|
||||||
|
|
||||||
|
\ set-alien-vector inline-unless-intrinsic
|
||||||
|
|
|
@ -67,7 +67,7 @@ M: double-rep reg-class-of drop float-regs ;
|
||||||
M: vector-rep reg-class-of drop float-regs ;
|
M: vector-rep reg-class-of drop float-regs ;
|
||||||
M: stack-params reg-class-of drop stack-params ;
|
M: stack-params reg-class-of drop stack-params ;
|
||||||
|
|
||||||
GENERIC: rep-size ( rep -- n )
|
GENERIC: rep-size ( rep -- n ) foldable
|
||||||
|
|
||||||
M: tagged-rep rep-size drop cell ;
|
M: tagged-rep rep-size drop cell ;
|
||||||
M: int-rep rep-size drop cell ;
|
M: int-rep rep-size drop cell ;
|
||||||
|
|
Loading…
Reference in New Issue