##shl-vector

Vocabulary
compiler.cfg.instructions

DefinitionMethods
USING: accessors compiler.cfg.gvn.avail
compiler.cfg.instructions kernel ;
M: ##shl-vector >avail-insn-defs [ ] change-dst drop ;

USING: accessors compiler.cfg.gvn.avail
compiler.cfg.instructions kernel ;
M: ##shl-vector >avail-insn-uses
[ dup >avail-vreg swap or ] change-src1
[ dup >avail-vreg swap or ] change-src2 drop ;

USING: accessors arrays compiler.cfg.gvn.expressions
compiler.cfg.gvn.graph compiler.cfg.instructions kernel
sequences.private ;
M: ##shl-vector >expr
\ ##shl-vector swap [ src1>> vreg>vn ] keep
[ src2>> vreg>vn ] keep [ rep>> ] keep drop 4 f <array>
3 swap [ set-array-nth ] keep 2 swap [ set-array-nth ] keep
1 swap [ set-array-nth ] keep 0 swap [ set-array-nth ] keep
;

USING: accessors arrays compiler.cfg.instructions
compiler.cfg.value-numbering.expressions
compiler.cfg.value-numbering.graph kernel sequences.private ;
M: ##shl-vector >expr
\ ##shl-vector swap [ src1>> vreg>vn ] keep
[ src2>> vreg>vn ] keep [ rep>> ] keep drop 4 f <array>
3 swap [ set-array-nth ] keep 2 swap [ set-array-nth ] keep
1 swap [ set-array-nth ] keep 0 swap [ set-array-nth ] keep
;

USING: accessors compiler.cfg.instructions
compiler.cfg.linear-scan.assignment kernel ;
M: ##shl-vector assign-insn-defs [ vreg>reg ] change-dst drop ;

USING: accessors compiler.cfg.instructions
compiler.cfg.linear-scan.assignment kernel ;
M: ##shl-vector assign-insn-uses
[ vreg>reg ] change-src1 [ vreg>reg ] change-src2 drop ;

USING: accessors compiler.cfg.instructions
compiler.cfg.representations.rewrite kernel ;
M: ##shl-vector convert-insn-defs
[ converted-value ] change-dst drop ;

USING: accessors compiler.cfg.instructions
compiler.cfg.representations.rewrite kernel ;
M: ##shl-vector convert-insn-uses
[ converted-value ] change-src1
[ converted-value ] change-src2 drop ;

USING: accessors arrays compiler.cfg.instructions
compiler.cfg.representations.preferred ;
M: ##shl-vector defs-vreg-reps rep>> 1array ;

USING: accessors arrays compiler.cfg.def-use
compiler.cfg.instructions ;
M: ##shl-vector defs-vregs dst>> 1array ;

USING: accessors compiler.cfg.instructions compiler.codegen
cpu.architecture kernel ;
M: ##shl-vector generate-insn
[ dst>> ] keep [ src1>> ] keep [ src2>> ] keep
[ rep>> ] keep drop %shl-vector ;

USING: accessors compiler.cfg.instructions
compiler.cfg.intrinsics.simd.backend cpu.architecture sequences
;
M: ##shl-vector insn-available? rep>> %shl-vector-reps member? ;

USING: accessors compiler.cfg.instructions compiler.cfg.renaming
kernel ;
M: ##shl-vector rename-insn-defs
[ rename-value ] change-dst drop ;

USING: accessors compiler.cfg.instructions compiler.cfg.renaming
kernel ;
M: ##shl-vector rename-insn-uses
[ rename-value ] change-src1 [ rename-value ] change-src2
drop ;

USING: accessors compiler.cfg.instructions
compiler.cfg.ssa.construction.private kernel ;
M: ##shl-vector ssa-rename-insn-defs
[ gen-name ] change-dst drop ;

USING: accessors compiler.cfg.instructions
compiler.cfg.ssa.construction.private kernel ;
M: ##shl-vector ssa-rename-insn-uses
[ top-name ] change-src1 [ top-name ] change-src2 drop ;

USING: accessors arrays compiler.cfg.instructions
compiler.cfg.representations.preferred cpu.architecture kernel ;
M: ##shl-vector uses-vreg-reps
[ rep>> ] [ drop int-scalar-rep ] bi 2array ;

USING: accessors arrays compiler.cfg.def-use
compiler.cfg.instructions kernel ;
M: ##shl-vector uses-vregs [ src1>> ] [ src2>> ] bi 2array ;