compiler.*: moving all words only relevant for testing to compiler.test
parent
ae85746787
commit
a36c0cb5ac
|
@ -1,7 +1,6 @@
|
||||||
USING: accessors assocs compiler.cfg.utilities compiler.cfg
|
USING: accessors assocs compiler.cfg.branch-splitting
|
||||||
compiler.cfg.branch-splitting compiler.cfg.debugger
|
compiler.cfg.instructions compiler.cfg.predecessors compiler.cfg.rpo
|
||||||
compiler.cfg.predecessors compiler.cfg.rpo compiler.cfg.instructions fry kernel
|
compiler.cfg.utilities compiler.test fry kernel namespaces tools.test ;
|
||||||
tools.test namespaces sequences vectors ;
|
|
||||||
IN: compiler.cfg.branch-splitting.tests
|
IN: compiler.cfg.branch-splitting.tests
|
||||||
|
|
||||||
: get-predecessors ( cfg -- assoc )
|
: get-predecessors ( cfg -- assoc )
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
USING: accessors compiler.cfg compiler.cfg.copy-prop compiler.cfg.debugger
|
USING: accessors compiler.cfg.copy-prop compiler.cfg.instructions
|
||||||
compiler.cfg.instructions compiler.cfg.registers compiler.cfg.utilities
|
compiler.cfg.registers compiler.cfg.utilities compiler.test
|
||||||
cpu.architecture kernel namespaces tools.test ;
|
cpu.architecture namespaces tools.test ;
|
||||||
IN: compiler.cfg.copy-prop.tests
|
IN: compiler.cfg.copy-prop.tests
|
||||||
|
|
||||||
: test-copy-propagation ( -- )
|
: test-copy-propagation ( -- )
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
! Copyright (C) 2008, 2011 Slava Pestov.
|
! Copyright (C) 2008, 2011 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors assocs classes.tuple compiler.cfg
|
USING: accessors assocs classes.tuple compiler.cfg
|
||||||
compiler.cfg.builder compiler.cfg.def-use
|
compiler.cfg.builder compiler.cfg.finalization compiler.cfg.gc-checks
|
||||||
compiler.cfg.finalization compiler.cfg.gc-checks
|
|
||||||
compiler.cfg.instructions compiler.cfg.linearization
|
compiler.cfg.instructions compiler.cfg.linearization
|
||||||
compiler.cfg.optimizer compiler.cfg.registers
|
compiler.cfg.optimizer compiler.cfg.registers
|
||||||
compiler.cfg.representations
|
compiler.cfg.representations compiler.cfg.save-contexts
|
||||||
compiler.cfg.representations.preferred compiler.cfg.rpo
|
compiler.cfg.utilities compiler.tree.builder compiler.tree.optimizer
|
||||||
compiler.cfg.save-contexts
|
fry io kernel namespaces prettyprint prettyprint.backend
|
||||||
compiler.cfg.utilities compiler.tree.builder
|
prettyprint.custom prettyprint.sections quotations sequences strings
|
||||||
compiler.tree.optimizer compiler.units fry hashtables io kernel math
|
words ;
|
||||||
namespaces prettyprint prettyprint.backend prettyprint.custom
|
|
||||||
prettyprint.sections quotations random sequences vectors words strings ;
|
|
||||||
FROM: compiler.cfg.linearization => number-blocks ;
|
FROM: compiler.cfg.linearization => number-blocks ;
|
||||||
IN: compiler.cfg.debugger
|
IN: compiler.cfg.debugger
|
||||||
|
|
||||||
|
@ -91,38 +88,3 @@ M: insn insn. tuple>array but-last [
|
||||||
M: ds-loc pprint* \ D: pprint-loc ;
|
M: ds-loc pprint* \ D: pprint-loc ;
|
||||||
|
|
||||||
M: rs-loc pprint* \ R: pprint-loc ;
|
M: rs-loc pprint* \ R: pprint-loc ;
|
||||||
|
|
||||||
: resolve-phis ( bb -- )
|
|
||||||
[
|
|
||||||
[ [ [ get ] dip ] assoc-map ] change-inputs drop
|
|
||||||
] each-phi ;
|
|
||||||
|
|
||||||
: test-bb ( insns n -- )
|
|
||||||
[ insns>block dup ] keep set resolve-phis ;
|
|
||||||
|
|
||||||
: edge ( from to -- )
|
|
||||||
[ get ] bi@ 1vector >>successors drop ;
|
|
||||||
|
|
||||||
: edges ( from tos -- )
|
|
||||||
[ get ] [ [ get ] V{ } map-as ] bi* >>successors drop ;
|
|
||||||
|
|
||||||
: test-diamond ( -- )
|
|
||||||
0 1 edge
|
|
||||||
1 { 2 3 } edges
|
|
||||||
2 4 edge
|
|
||||||
3 4 edge ;
|
|
||||||
|
|
||||||
: fake-representations ( cfg -- )
|
|
||||||
post-order [
|
|
||||||
instructions>> [
|
|
||||||
[ [ temp-vregs ] [ temp-vreg-reps ] bi zip ]
|
|
||||||
[ [ defs-vregs ] [ defs-vreg-reps ] bi zip ]
|
|
||||||
bi append
|
|
||||||
] map concat
|
|
||||||
] map concat >hashtable representations set ;
|
|
||||||
|
|
||||||
: count-insns ( quot insn-check -- ? )
|
|
||||||
[ test-regs [ cfg>insns ] map concat ] dip count ; inline
|
|
||||||
|
|
||||||
: contains-insn? ( quot insn-check -- ? )
|
|
||||||
count-insns 0 > ; inline
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
! Copyright (C) 2009 Daniel Ehrenberg.
|
! Copyright (C) 2009 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel tools.test accessors vectors sequences namespaces
|
USING: compiler.cfg.def-use compiler.cfg.instructions
|
||||||
arrays compiler.cfg.def-use compiler.cfg compiler.cfg.debugger
|
compiler.cfg.registers compiler.cfg.utilities compiler.test namespaces
|
||||||
compiler.cfg.instructions compiler.cfg.registers compiler.cfg.utilities
|
tools.test ;
|
||||||
cpu.architecture ;
|
|
||||||
IN: compiler.cfg.def-use.tests
|
IN: compiler.cfg.def-use.tests
|
||||||
|
|
||||||
! compute-insns
|
! compute-insns
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
USING: accessors arrays assocs compiler.cfg compiler.cfg.dominance
|
USING: accessors arrays assocs compiler.cfg.dominance
|
||||||
compiler.cfg.dominance.private compiler.cfg.debugger compiler.cfg.predecessors
|
compiler.cfg.dominance.private compiler.cfg.utilities compiler.test
|
||||||
compiler.cfg.utilities grouping kernel math.ranges namespaces sequences sets
|
grouping kernel math.ranges namespaces sequences sets tools.test ;
|
||||||
tools.test vectors ;
|
|
||||||
IN: compiler.cfg.dominance.tests
|
IN: compiler.cfg.dominance.tests
|
||||||
|
|
||||||
: test-dominance ( -- )
|
: test-dominance ( -- )
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
USING: accessors alien arrays byte-arrays combinators.short-circuit
|
USING: accessors alien arrays byte-arrays combinators.short-circuit
|
||||||
compiler.cfg compiler.cfg.comparisons compiler.cfg.debugger
|
compiler.cfg compiler.cfg.comparisons compiler.cfg.gc-checks
|
||||||
compiler.cfg.gc-checks compiler.cfg.gc-checks.private
|
compiler.cfg.gc-checks.private compiler.cfg.instructions
|
||||||
compiler.cfg.instructions compiler.cfg.registers compiler.cfg.rpo
|
compiler.cfg.registers compiler.cfg.rpo compiler.cfg.utilities
|
||||||
compiler.cfg.utilities compiler.test cpu.architecture kernel layouts
|
compiler.test cpu.architecture kernel layouts math memory namespaces
|
||||||
math memory namespaces sequences tools.test ;
|
sequences tools.test ;
|
||||||
IN: compiler.cfg.gc-checks.tests
|
IN: compiler.cfg.gc-checks.tests
|
||||||
|
|
||||||
! insert-gc-check?
|
! insert-gc-check?
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
USING: accessors assocs compiler.cfg.debugger compiler.cfg
|
USING: accessors assocs compiler.cfg.linearization
|
||||||
compiler.cfg.linearization compiler.cfg.linearization.private
|
compiler.cfg.linearization.private compiler.cfg.utilities
|
||||||
compiler.cfg.utilities dlists kernel make namespaces sequences tools.test ;
|
compiler.test kernel make namespaces sequences tools.test ;
|
||||||
IN: compiler.cfg.linearization.tests
|
IN: compiler.cfg.linearization.tests
|
||||||
|
|
||||||
! linearization-order
|
! linearization-order
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
USING: accessors alien assocs compiler.cfg compiler.cfg.comparisons
|
USING: accessors alien assocs compiler.cfg compiler.cfg.comparisons
|
||||||
compiler.cfg.debugger compiler.cfg.def-use compiler.cfg.instructions
|
compiler.cfg.def-use compiler.cfg.instructions compiler.cfg.liveness
|
||||||
compiler.cfg.liveness compiler.cfg.registers
|
compiler.cfg.registers compiler.cfg.ssa.destruction.leaders
|
||||||
compiler.cfg.ssa.destruction.leaders compiler.cfg.utilities
|
compiler.cfg.utilities compiler.test cpu.architecture
|
||||||
cpu.architecture cpu.x86.assembler.operands kernel math namespaces
|
cpu.x86.assembler.operands kernel math namespaces sequences system
|
||||||
sequences system tools.test ;
|
tools.test ;
|
||||||
IN: compiler.cfg.liveness.tests
|
IN: compiler.cfg.liveness.tests
|
||||||
QUALIFIED: sets
|
QUALIFIED: sets
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
USING: accessors compiler.cfg.debugger
|
USING: accessors compiler.cfg.loop-detection
|
||||||
compiler.cfg.loop-detection compiler.cfg.loop-detection.private
|
compiler.cfg.loop-detection.private compiler.cfg.utilities
|
||||||
compiler.cfg.utilities kernel namespaces sequences sets
|
compiler.test kernel namespaces sequences sets tools.test ;
|
||||||
tools.test ;
|
|
||||||
IN: compiler.cfg.loop-detection.tests
|
IN: compiler.cfg.loop-detection.tests
|
||||||
|
|
||||||
{ V{ 0 } { 1 } } [
|
{ V{ 0 } { 1 } } [
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
USING: arrays sequences kernel namespaces accessors compiler.cfg
|
USING: compiler.cfg.instructions compiler.cfg.registers
|
||||||
compiler.cfg.instructions
|
compiler.cfg.representations.coalescing compiler.cfg.utilities
|
||||||
compiler.cfg.registers
|
compiler.test kernel namespaces tools.test ;
|
||||||
compiler.cfg.debugger
|
|
||||||
compiler.cfg.representations.coalescing
|
|
||||||
compiler.cfg.utilities
|
|
||||||
tools.test ;
|
|
||||||
IN: compiler.cfg.representations.coalescing.tests
|
IN: compiler.cfg.representations.coalescing.tests
|
||||||
|
|
||||||
: test-scc ( -- )
|
: test-scc ( -- )
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
USING: accessors compiler.cfg compiler.cfg.debugger
|
USING: accessors compiler.cfg compiler.cfg.comparisons
|
||||||
compiler.cfg.instructions compiler.cfg.registers
|
compiler.cfg.instructions compiler.cfg.registers
|
||||||
compiler.cfg.representations.preferred cpu.architecture kernel
|
compiler.cfg.representations.conversion
|
||||||
namespaces tools.test sequences arrays system literals layouts
|
compiler.cfg.representations.preferred compiler.cfg.utilities
|
||||||
math compiler.constants compiler.cfg.representations.conversion
|
compiler.constants compiler.test cpu.architecture kernel layouts
|
||||||
compiler.cfg.representations.rewrite
|
literals make math namespaces sequences system tools.test ;
|
||||||
compiler.cfg.comparisons compiler.cfg.utilities
|
|
||||||
make ;
|
|
||||||
FROM: alien.c-types => char ;
|
FROM: alien.c-types => char ;
|
||||||
IN: compiler.cfg.representations
|
IN: compiler.cfg.representations
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
USING: accessors compiler.cfg.debugger
|
USING: accessors compiler.cfg.instructions compiler.cfg.registers
|
||||||
compiler.cfg.instructions compiler.cfg.registers
|
compiler.cfg.save-contexts compiler.test cpu.architecture kernel
|
||||||
compiler.cfg.save-contexts kernel namespaces tools.test
|
namespaces tools.test ;
|
||||||
cpu.x86.assembler.operands cpu.architecture ;
|
|
||||||
IN: compiler.cfg.save-contexts.tests
|
IN: compiler.cfg.save-contexts.tests
|
||||||
|
|
||||||
! insns-needs-save-context?
|
! insns-needs-save-context?
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
USING: accessors compiler.cfg compiler.cfg.debugger
|
USING: accessors assocs compiler.cfg compiler.cfg.instructions
|
||||||
compiler.cfg.dominance compiler.cfg.instructions
|
compiler.cfg.registers compiler.cfg.ssa.construction
|
||||||
compiler.cfg.predecessors compiler.cfg.ssa.construction assocs
|
compiler.cfg.ssa.construction.private compiler.cfg.utilities
|
||||||
compiler.cfg.registers compiler.cfg.ssa.construction.private
|
compiler.test kernel namespaces sequences tools.test ;
|
||||||
compiler.cfg.utilities cpu.architecture kernel namespaces sequences tools.test
|
|
||||||
vectors ;
|
|
||||||
IN: compiler.cfg.ssa.construction.tests
|
IN: compiler.cfg.ssa.construction.tests
|
||||||
|
|
||||||
! insert-phi-later
|
! insert-phi-later
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
USING: accessors arrays compiler.cfg compiler.cfg.debugger
|
USING: accessors arrays compiler.cfg
|
||||||
compiler.cfg.ssa.construction.tdmsc compiler.cfg.utilities
|
compiler.cfg.ssa.construction.tdmsc compiler.cfg.utilities
|
||||||
kernel namespaces sequences tools.test ;
|
compiler.test kernel namespaces sequences tools.test ;
|
||||||
QUALIFIED: sets
|
QUALIFIED: sets
|
||||||
IN: compiler.cfg.ssa.construction.tdmsc.tests
|
IN: compiler.cfg.ssa.construction.tdmsc.tests
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
USING: accessors compiler.cfg compiler.cfg.debugger
|
USING: accessors alien.c-types compiler.cfg.comparisons
|
||||||
compiler.cfg.def-use compiler.cfg.dominance
|
compiler.cfg.def-use compiler.cfg.instructions compiler.cfg.liveness
|
||||||
compiler.cfg.instructions compiler.cfg.liveness
|
compiler.cfg.registers compiler.cfg.ssa.interference
|
||||||
compiler.cfg.registers compiler.cfg.predecessors
|
|
||||||
compiler.cfg.comparisons compiler.cfg.ssa.interference
|
|
||||||
compiler.cfg.ssa.interference.private
|
|
||||||
compiler.cfg.ssa.interference.live-ranges
|
compiler.cfg.ssa.interference.live-ranges
|
||||||
compiler.cfg.utilities
|
compiler.cfg.ssa.interference.private compiler.cfg.utilities
|
||||||
cpu.architecture kernel namespaces tools.test alien.c-types
|
compiler.test cpu.architecture kernel namespaces sequences slots
|
||||||
arrays sequences slots ;
|
tools.test ;
|
||||||
IN: compiler.cfg.ssa.interference.tests
|
IN: compiler.cfg.ssa.interference.tests
|
||||||
|
|
||||||
: test-interference ( -- )
|
: test-interference ( -- )
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
USING: accessors arrays assocs compiler.cfg.instructions compiler.cfg.registers
|
USING: accessors arrays assocs compiler.cfg.instructions compiler.cfg.registers
|
||||||
compiler.cfg.stacks.padding compiler.cfg.utilities kernel sequences sorting
|
compiler.cfg.stacks.padding compiler.cfg.utilities compiler.test kernel
|
||||||
vectors tools.test ;
|
sequences sorting vectors tools.test ;
|
||||||
IN: compiler.cfg.stacks.padding.tests
|
IN: compiler.cfg.stacks.padding.tests
|
||||||
|
|
||||||
! classify-read: initialized locations
|
! classify-read: initialized locations
|
||||||
|
|
|
@ -83,9 +83,6 @@ IN: compiler.cfg.utilities
|
||||||
: connect-Nto1-bbs ( froms to -- )
|
: connect-Nto1-bbs ( froms to -- )
|
||||||
'[ _ connect-bbs ] each ;
|
'[ _ connect-bbs ] each ;
|
||||||
|
|
||||||
: make-edges ( block-map edgelist -- )
|
|
||||||
[ [ of ] with map first2 connect-bbs ] with each ;
|
|
||||||
|
|
||||||
! Abstract generic stuff
|
! Abstract generic stuff
|
||||||
MACRO: apply-passes ( passes -- quot: ( obj -- ) )
|
MACRO: apply-passes ( passes -- quot: ( obj -- ) )
|
||||||
unclip-last [ [ 1array \ dup prefix ] map [ ] concat-as ] dip suffix ;
|
unclip-last [ [ 1array \ dup prefix ] map [ ] concat-as ] dip suffix ;
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
USING: accessors alien assocs combinators.short-circuit
|
USING: accessors alien assocs combinators.short-circuit compiler.cfg
|
||||||
compiler.cfg compiler.cfg.comparisons compiler.cfg.dce
|
compiler.cfg.comparisons compiler.cfg.dce compiler.cfg.instructions
|
||||||
compiler.cfg.debugger compiler.cfg.instructions
|
|
||||||
compiler.cfg.registers compiler.cfg.representations
|
compiler.cfg.registers compiler.cfg.representations
|
||||||
compiler.cfg.ssa.destruction compiler.cfg.utilities
|
compiler.cfg.ssa.destruction compiler.cfg.utilities
|
||||||
compiler.cfg.value-numbering cpu.architecture kernel layouts
|
compiler.cfg.value-numbering compiler.test cpu.architecture kernel
|
||||||
literals math namespaces sequences system tools.test ;
|
layouts literals math namespaces sequences system tools.test ;
|
||||||
! need cfg simd loaded for some tests
|
! need cfg simd loaded for some tests
|
||||||
USE: compiler.cfg.value-numbering.simd
|
USE: compiler.cfg.value-numbering.simd
|
||||||
QUALIFIED-WITH: alien.c-types c
|
QUALIFIED-WITH: alien.c-types c
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
! Copyright (C) 2010 Slava Pestov.
|
! Copyright (C) 2010 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays compiler.cfg compiler.units kernel sequences
|
USING: accessors arrays assocs compiler.cfg compiler.cfg.debugger
|
||||||
stack-checker tools.test vocabs words ;
|
compiler.cfg.def-use compiler.cfg.linearization compiler.cfg.registers
|
||||||
|
compiler.cfg.representations.preferred compiler.cfg.rpo
|
||||||
|
compiler.cfg.stacks compiler.cfg.stacks.local compiler.cfg.utilities
|
||||||
|
compiler.tree.builder compiler.tree.checker compiler.tree.def-use
|
||||||
|
compiler.tree.normalization compiler.tree.propagation
|
||||||
|
compiler.tree.propagation.info compiler.tree.recursive compiler.units
|
||||||
|
fry hashtables kernel math namespaces sequences stack-checker
|
||||||
|
tools.test vectors vocabs words ;
|
||||||
IN: compiler.test
|
IN: compiler.test
|
||||||
|
|
||||||
: decompile ( word -- )
|
: decompile ( word -- )
|
||||||
|
@ -18,9 +25,6 @@ IN: compiler.test
|
||||||
: compiler-test ( name -- )
|
: compiler-test ( name -- )
|
||||||
"resource:basis/compiler/tests/" ".factor" surround run-test-file ;
|
"resource:basis/compiler/tests/" ".factor" surround run-test-file ;
|
||||||
|
|
||||||
USING: compiler.cfg.registers compiler.cfg.stacks compiler.cfg.stacks.local
|
|
||||||
fry namespaces ;
|
|
||||||
|
|
||||||
: init-cfg-test ( -- )
|
: init-cfg-test ( -- )
|
||||||
reset-vreg-counter begin-stack-analysis
|
reset-vreg-counter begin-stack-analysis
|
||||||
<basic-block> dup basic-block set begin-local-analysis
|
<basic-block> dup basic-block set begin-local-analysis
|
||||||
|
@ -29,3 +33,56 @@ fry namespaces ;
|
||||||
|
|
||||||
: cfg-unit-test ( result quot -- )
|
: cfg-unit-test ( result quot -- )
|
||||||
'[ init-cfg-test @ ] unit-test ; inline
|
'[ init-cfg-test @ ] unit-test ; inline
|
||||||
|
|
||||||
|
: edge ( from to -- )
|
||||||
|
[ get ] bi@ 1vector >>successors drop ;
|
||||||
|
|
||||||
|
: edges ( from tos -- )
|
||||||
|
[ get ] [ [ get ] V{ } map-as ] bi* >>successors drop ;
|
||||||
|
|
||||||
|
: test-diamond ( -- )
|
||||||
|
0 1 edge
|
||||||
|
1 { 2 3 } edges
|
||||||
|
2 4 edge
|
||||||
|
3 4 edge ;
|
||||||
|
|
||||||
|
: resolve-phis ( bb -- )
|
||||||
|
[
|
||||||
|
[ [ [ get ] dip ] assoc-map ] change-inputs drop
|
||||||
|
] each-phi ;
|
||||||
|
|
||||||
|
: test-bb ( insns n -- )
|
||||||
|
[ insns>block dup ] keep set resolve-phis ;
|
||||||
|
|
||||||
|
: fake-representations ( cfg -- )
|
||||||
|
post-order [
|
||||||
|
instructions>> [
|
||||||
|
[ [ temp-vregs ] [ temp-vreg-reps ] bi zip ]
|
||||||
|
[ [ defs-vregs ] [ defs-vreg-reps ] bi zip ]
|
||||||
|
bi append
|
||||||
|
] map concat
|
||||||
|
] map concat >hashtable representations set ;
|
||||||
|
|
||||||
|
: count-insns ( quot insn-check -- ? )
|
||||||
|
[ test-regs [ cfg>insns ] map concat ] dip count ; inline
|
||||||
|
|
||||||
|
: contains-insn? ( quot insn-check -- ? )
|
||||||
|
count-insns 0 > ; inline
|
||||||
|
|
||||||
|
: make-edges ( block-map edgelist -- )
|
||||||
|
[ [ of ] with map first2 connect-bbs ] with each ;
|
||||||
|
|
||||||
|
: final-info ( quot -- seq )
|
||||||
|
build-tree
|
||||||
|
analyze-recursive
|
||||||
|
normalize
|
||||||
|
propagate
|
||||||
|
compute-def-use
|
||||||
|
dup check-nodes
|
||||||
|
last node-input-infos ;
|
||||||
|
|
||||||
|
: final-classes ( quot -- seq )
|
||||||
|
final-info [ class>> ] map ;
|
||||||
|
|
||||||
|
: final-literals ( quot -- seq )
|
||||||
|
final-info [ literal>> ] map ;
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
USING: accessors assocs combinators compiler compiler.cfg
|
USING: alien.c-types arrays assocs combinators compiler.cfg
|
||||||
compiler.cfg.debugger compiler.cfg.instructions
|
compiler.cfg.build-stack-frame compiler.cfg.instructions
|
||||||
compiler.cfg.registers compiler.cfg.linear-scan
|
compiler.cfg.linear-scan compiler.cfg.registers
|
||||||
compiler.cfg.ssa.destruction compiler.cfg.build-stack-frame
|
compiler.cfg.ssa.destruction compiler.cfg.utilities compiler.codegen
|
||||||
compiler.cfg.utilities compiler.codegen compiler.units cpu.architecture
|
compiler.test compiler.units cpu.architecture hashtables kernel
|
||||||
hashtables kernel namespaces sequences tools.test vectors words layouts
|
layouts literals math namespaces sequences tools.test words ;
|
||||||
literals math arrays alien.c-types alien.syntax math.private ;
|
|
||||||
IN: compiler.tests.low-level-ir
|
IN: compiler.tests.low-level-ir
|
||||||
|
|
||||||
: compile-cfg ( cfg -- word )
|
: compile-cfg ( cfg -- word )
|
||||||
|
|
|
@ -184,22 +184,6 @@ SYMBOL: node-count
|
||||||
make-report report. ;
|
make-report report. ;
|
||||||
|
|
||||||
! More utilities
|
! More utilities
|
||||||
|
|
||||||
: final-info ( quot -- seq )
|
|
||||||
build-tree
|
|
||||||
analyze-recursive
|
|
||||||
normalize
|
|
||||||
propagate
|
|
||||||
compute-def-use
|
|
||||||
dup check-nodes
|
|
||||||
last node-input-infos ;
|
|
||||||
|
|
||||||
: final-classes ( quot -- seq )
|
|
||||||
final-info [ class>> ] map ;
|
|
||||||
|
|
||||||
: final-literals ( quot -- seq )
|
|
||||||
final-info [ literal>> ] map ;
|
|
||||||
|
|
||||||
: cleaned-up-tree ( quot -- nodes )
|
: cleaned-up-tree ( quot -- nodes )
|
||||||
[
|
[
|
||||||
build-tree
|
build-tree
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
! Copyright (C) 2009 Slava Pestov, Daniel Ehrenberg.
|
! Copyright (C) 2009 Slava Pestov, Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors combinators combinators.private compiler.tree
|
USING: accessors combinators combinators.private compiler.test
|
||||||
compiler.tree.propagation.call-effect compiler.units math effects kernel
|
compiler.tree compiler.tree.builder compiler.tree.debugger
|
||||||
compiler.tree.builder compiler.tree.optimizer compiler.tree.debugger sequences
|
compiler.tree.optimizer compiler.tree.propagation.call-effect
|
||||||
eval fry kernel.private tools.test ;
|
compiler.units effects eval fry kernel kernel.private math sequences
|
||||||
|
tools.test ;
|
||||||
IN: compiler.tree.propagation.call-effect.tests
|
IN: compiler.tree.propagation.call-effect.tests
|
||||||
|
|
||||||
! cached-effect
|
! cached-effect
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
USING: accessors alien alien.accessors alien.c-types alien.data arrays
|
USING: accessors alien alien.accessors alien.c-types alien.data arrays
|
||||||
assocs byte-arrays classes classes.algebra classes.struct
|
assocs byte-arrays classes classes.algebra classes.struct
|
||||||
classes.tuple.private combinators.short-circuit compiler.tree
|
classes.tuple.private combinators.short-circuit compiler.test
|
||||||
compiler.tree.builder compiler.tree.debugger compiler.tree.optimizer
|
compiler.tree compiler.tree.builder compiler.tree.debugger
|
||||||
compiler.tree.propagation.info effects fry generic.single hashtables
|
compiler.tree.optimizer compiler.tree.propagation.info effects fry
|
||||||
kernel kernel.private layouts literals locals math math.floats.private
|
generic.single hashtables kernel kernel.private layouts literals
|
||||||
math.functions math.integers.private math.intervals math.libm
|
locals math math.floats.private math.functions math.integers.private
|
||||||
math.order math.private quotations sequences sequences.private sets
|
math.intervals math.libm math.order math.private quotations sequences
|
||||||
slots.private sorting specialized-arrays strings strings.private
|
sequences.private sets slots.private sorting specialized-arrays
|
||||||
system tools.test vectors vocabs words ;
|
strings strings.private system tools.test vectors vocabs words ;
|
||||||
FROM: math => float ;
|
FROM: math => float ;
|
||||||
SPECIALIZED-ARRAY: double
|
SPECIALIZED-ARRAY: double
|
||||||
SPECIALIZED-ARRAY: void*
|
SPECIALIZED-ARRAY: void*
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
USING: compiler.cfg.debugger compiler.cfg.instructions
|
USING: compiler.cfg.instructions compiler.cfg.registers
|
||||||
compiler.cfg.registers compiler.codegen.gc-maps
|
compiler.codegen.gc-maps compiler.codegen.relocation compiler.test
|
||||||
compiler.codegen.relocation cpu.architecture cpu.x86 cpu.x86.assembler
|
cpu.architecture cpu.x86 cpu.x86.assembler cpu.x86.assembler.operands
|
||||||
cpu.x86.assembler.operands cpu.x86.features kernel kernel.private
|
cpu.x86.features kernel kernel.private layouts literals make math
|
||||||
layouts literals make math math.libm namespaces sequences system
|
math.libm namespaces sequences system tools.test ;
|
||||||
tools.test ;
|
|
||||||
IN: cpu.x86.tests
|
IN: cpu.x86.tests
|
||||||
|
|
||||||
{ } [
|
{ } [
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
! Copyright (C) 2011 Alex Vondrak.
|
! Copyright (C) 2011 Alex Vondrak.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors assocs compiler.cfg compiler.cfg.debugger
|
USING: accessors assocs compiler.cfg compiler.cfg.graphviz
|
||||||
compiler.cfg.graphviz compiler.cfg.gvn
|
compiler.cfg.gvn compiler.cfg.gvn.expressions compiler.cfg.gvn.graph
|
||||||
compiler.cfg.gvn.expressions compiler.cfg.gvn.graph
|
compiler.cfg.optimizer compiler.cfg.utilities compiler.test
|
||||||
compiler.cfg.optimizer compiler.cfg.utilities continuations formatting graphviz
|
continuations formatting graphviz.notation graphviz.render
|
||||||
graphviz.notation graphviz.render io.directories kernel
|
io.directories kernel math.parser namespaces prettyprint sequences
|
||||||
math.parser namespaces prettyprint sequences sorting splitting
|
sorting splitting tools.annotations ;
|
||||||
tools.annotations ;
|
|
||||||
IN: compiler.cfg.gvn.testing
|
IN: compiler.cfg.gvn.testing
|
||||||
|
|
||||||
GENERIC: expr>str ( expr -- str )
|
GENERIC: expr>str ( expr -- str )
|
||||||
|
|
Loading…
Reference in New Issue