1 ! Copyright (C) 2010 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors assocs cpu.architecture grouping kernel
5 compiler.cfg.instructions
8 compiler.cfg.gvn.rewrite ;
9 IN: compiler.cfg.gvn.misc
12 [ loc>> ] [ src>> vreg>insn ] bi
14 insn>literal dup immediate-store?
15 [ swap \ ##replace-imm new-insn ] [ 2drop f ] if
19 [ dst>> ] [ inputs>> values [ vreg>vn ] map sift ] bi
22 [ first <copy> ] if-empty