##test-vector


Vocabulary
compiler.cfg.instructions

Definition
IN: compiler.cfg.instructions

TUPLE: ##test-vector < foldable-insn
dst src1 temp rep vcc insn# ;


Methods
USING: accessors compiler.cfg.gvn.avail
compiler.cfg.instructions kernel ;

M: ##test-vector >avail-insn-defs [ ] change-dst drop ;


USING: accessors compiler.cfg.gvn.avail
compiler.cfg.instructions kernel ;

M: ##test-vector >avail-insn-temps [ ] change-temp drop ;


USING: accessors compiler.cfg.gvn.avail
compiler.cfg.instructions kernel ;

M: ##test-vector >avail-insn-uses
[ dup >avail-vreg swap or ] change-src1 drop ;


USING: accessors arrays compiler.cfg.instructions
compiler.cfg.value-numbering.expressions
compiler.cfg.value-numbering.graph kernel sequences.private ;

M: ##test-vector >expr
\ ##test-vector swap [ src1>> vreg>vn ] keep [ rep>> ] keep
[ vcc>> ] 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.gvn.expressions
compiler.cfg.gvn.graph compiler.cfg.instructions kernel
sequences.private ;

M: ##test-vector >expr
\ ##test-vector swap [ src1>> vreg>vn ] keep [ rep>> ] keep
[ vcc>> ] 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: ##test-vector assign-insn-defs
[ vreg>reg ] change-dst drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.linear-scan.assignment kernel ;

M: ##test-vector assign-insn-temps
[ vreg>reg ] change-temp drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.linear-scan.assignment kernel ;

M: ##test-vector assign-insn-uses
[ vreg>reg ] change-src1 drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.representations.rewrite kernel ;

M: ##test-vector convert-insn-defs
[ converted-value ] change-dst drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.representations.rewrite kernel ;

M: ##test-vector convert-insn-temps [ ] change-temp drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.representations.rewrite kernel ;

M: ##test-vector convert-insn-uses
[ converted-value ] change-src1 drop ;


USING: compiler.cfg.instructions
compiler.cfg.representations.preferred cpu.architecture kernel
;

M: ##test-vector defs-vreg-reps drop { tagged-rep } ;


USING: accessors arrays compiler.cfg.def-use
compiler.cfg.instructions ;

M: ##test-vector defs-vregs dst>> 1array ;


USING: accessors compiler.cfg.instructions compiler.codegen
cpu.architecture kernel ;

M: ##test-vector generate-insn
[ dst>> ] keep [ src1>> ] keep [ temp>> ] keep
[ rep>> ] keep [ vcc>> ] keep drop %test-vector ;


USING: accessors compiler.cfg.instructions
compiler.cfg.intrinsics.simd.backend cpu.architecture sequences
;

M: ##test-vector insn-available?
rep>> %test-vector-reps member? ;


USING: accessors compiler.cfg.instructions
compiler.cfg.renaming kernel ;

M: ##test-vector rename-insn-defs
[ rename-value ] change-dst drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.registers compiler.cfg.renaming kernel ;

M: ##test-vector rename-insn-temps
[ drop next-vreg ] change-temp drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.renaming kernel ;

M: ##test-vector rename-insn-uses
[ rename-value ] change-src1 drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.ssa.construction.private kernel ;

M: ##test-vector ssa-rename-insn-defs
[ gen-name ] change-dst drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.ssa.construction.private kernel ;

M: ##test-vector ssa-rename-insn-temps [ ] change-temp drop ;


USING: accessors compiler.cfg.instructions
compiler.cfg.ssa.construction.private kernel ;

M: ##test-vector ssa-rename-insn-uses
[ top-name ] change-src1 drop ;


USING: compiler.cfg.instructions
compiler.cfg.representations.preferred cpu.architecture kernel
;

M: ##test-vector temp-vreg-reps drop { int-rep } ;


USING: accessors arrays compiler.cfg.def-use
compiler.cfg.instructions ;

M: ##test-vector temp-vregs temp>> 1array ;


USING: accessors arrays compiler.cfg.instructions
compiler.cfg.representations.preferred ;

M: ##test-vector uses-vreg-reps rep>> 1array ;


USING: accessors arrays compiler.cfg.def-use
compiler.cfg.instructions ;

M: ##test-vector uses-vregs src1>> 1array ;