Move insn class to compiler.cfg.instructions
parent
1912c57bb5
commit
492a15e345
|
@ -3,7 +3,7 @@
|
|||
USING: kernel math namespaces assocs hashtables sequences
|
||||
accessors vectors combinators sets classes compiler.cfg
|
||||
compiler.cfg.registers compiler.cfg.instructions
|
||||
compiler.cfg.instructions.syntax compiler.cfg.copy-prop ;
|
||||
compiler.cfg.copy-prop ;
|
||||
IN: compiler.cfg.alias-analysis
|
||||
|
||||
! Alias analysis -- assumes compiler.cfg.height has already run.
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
! Copyright (C) 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors assocs sets kernel namespaces sequences
|
||||
compiler.cfg.instructions compiler.cfg.instructions.syntax
|
||||
compiler.cfg.def-use ;
|
||||
compiler.cfg.instructions compiler.cfg.def-use ;
|
||||
IN: compiler.cfg.dead-code
|
||||
|
||||
! Dead code elimination -- assumes compiler.cfg.alias-analysis
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
! Copyright (C) 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors arrays kernel compiler.cfg.instructions
|
||||
compiler.cfg.instructions.syntax ;
|
||||
USING: accessors arrays kernel compiler.cfg.instructions ;
|
||||
IN: compiler.cfg.def-use
|
||||
|
||||
GENERIC: defs-vregs ( insn -- seq )
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
! Copyright (C) 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors math namespaces sequences kernel fry
|
||||
compiler.cfg compiler.cfg.registers compiler.cfg.instructions
|
||||
compiler.cfg.instructions.syntax ;
|
||||
compiler.cfg compiler.cfg.registers compiler.cfg.instructions ;
|
||||
IN: compiler.cfg.height
|
||||
|
||||
! Combine multiple stack height changes into one at the
|
||||
|
|
|
@ -7,6 +7,7 @@ compiler.cfg.instructions.syntax ;
|
|||
IN: compiler.cfg.instructions
|
||||
|
||||
! Virtual CPU instructions, used by CFG and machine IRs
|
||||
TUPLE: insn ;
|
||||
|
||||
! Instruction with no side effects; if 'out' is never read, we
|
||||
! can eliminate it.
|
||||
|
|
|
@ -4,11 +4,15 @@ USING: classes.tuple classes.tuple.parser kernel words
|
|||
make fry sequences parser ;
|
||||
IN: compiler.cfg.instructions.syntax
|
||||
|
||||
TUPLE: insn ;
|
||||
: insn-word ( -- word )
|
||||
#! We want to put the insn tuple in compiler.cfg.instructions,
|
||||
#! but we cannot have circularity between that vocabulary and
|
||||
#! this one.
|
||||
"insn" "compiler.cfg.instructions" lookup ;
|
||||
|
||||
: INSN:
|
||||
parse-tuple-definition "regs" suffix
|
||||
[ dup tuple eq? [ drop insn ] when ] dip
|
||||
[ dup tuple eq? [ drop insn-word ] when ] dip
|
||||
[ define-tuple-class ]
|
||||
[ 2drop save-location ]
|
||||
[ 2drop dup '[ f _ boa , ] define-inline ]
|
||||
|
|
|
@ -4,8 +4,7 @@ USING: kernel math accessors sequences namespaces make
|
|||
combinators
|
||||
compiler.cfg
|
||||
compiler.cfg.rpo
|
||||
compiler.cfg.instructions
|
||||
compiler.cfg.instructions.syntax ;
|
||||
compiler.cfg.instructions ;
|
||||
IN: compiler.cfg.linearization
|
||||
|
||||
! Convert CFG IR to machine IR.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: namespaces accessors math.order assocs kernel sequences
|
||||
combinators make cpu.architecture compiler.cfg.instructions
|
||||
compiler.cfg.instructions.syntax compiler.cfg.registers ;
|
||||
compiler.cfg.registers ;
|
||||
IN: compiler.cfg.stack-frame
|
||||
|
||||
SYMBOL: frame-required?
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
! Copyright (C) 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: namespaces assocs sequences kernel accessors
|
||||
compiler.cfg.instructions compiler.cfg.instructions.syntax
|
||||
compiler.cfg.value-numbering.graph ;
|
||||
compiler.cfg.instructions compiler.cfg.value-numbering.graph ;
|
||||
IN: compiler.cfg.value-numbering.propagate
|
||||
|
||||
! If two vregs compute the same value, replace references to
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
USING: kernel sequences layouts accessors combinators namespaces
|
||||
math
|
||||
compiler.cfg.instructions
|
||||
compiler.cfg.instructions.syntax
|
||||
compiler.cfg.value-numbering.graph
|
||||
compiler.cfg.value-numbering.simplify
|
||||
compiler.cfg.value-numbering.expressions ;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: kernel accessors combinators classes math layouts
|
||||
compiler.cfg.instructions
|
||||
compiler.cfg.instructions.syntax
|
||||
compiler.cfg.value-numbering.graph
|
||||
compiler.cfg.value-numbering.expressions ;
|
||||
IN: compiler.cfg.value-numbering.simplify
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
! Copyright (C) 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: kernel accessors namespaces assocs sets sequences locals
|
||||
compiler.cfg compiler.cfg.instructions
|
||||
compiler.cfg.instructions.syntax compiler.cfg.copy-prop ;
|
||||
compiler.cfg compiler.cfg.instructions compiler.cfg.copy-prop ;
|
||||
IN: compiler.cfg.write-barrier
|
||||
|
||||
! Eliminate redundant write barrier hits.
|
||||
|
|
Loading…
Reference in New Issue