2009-05-26 20:31:19 -04:00
|
|
|
! Copyright (C) 2008, 2009 Slava Pestov.
|
2008-10-22 19:41:37 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2009-05-27 19:58:01 -04:00
|
|
|
USING: kernel sequences accessors combinators namespaces
|
2009-06-30 21:13:35 -04:00
|
|
|
compiler.cfg.tco
|
2009-06-30 23:11:15 -04:00
|
|
|
compiler.cfg.useless-conditionals
|
|
|
|
compiler.cfg.branch-splitting
|
2009-07-16 03:17:58 -04:00
|
|
|
compiler.cfg.block-joining
|
2009-07-28 10:34:08 -04:00
|
|
|
compiler.cfg.ssa.construction
|
2008-10-22 22:59:07 -04:00
|
|
|
compiler.cfg.alias-analysis
|
|
|
|
compiler.cfg.value-numbering
|
2009-07-24 06:30:46 -04:00
|
|
|
compiler.cfg.copy-prop
|
2009-05-26 20:31:19 -04:00
|
|
|
compiler.cfg.dce
|
|
|
|
compiler.cfg.write-barrier
|
2009-08-08 01:24:46 -04:00
|
|
|
compiler.cfg.representations
|
2009-07-28 10:34:08 -04:00
|
|
|
compiler.cfg.ssa.destruction
|
2009-07-23 19:02:46 -04:00
|
|
|
compiler.cfg.empty-blocks
|
2009-06-05 18:32:12 -04:00
|
|
|
compiler.cfg.checker ;
|
2008-10-22 19:41:37 -04:00
|
|
|
IN: compiler.cfg.optimizer
|
|
|
|
|
2009-06-05 18:32:12 -04:00
|
|
|
SYMBOL: check-optimizer?
|
|
|
|
|
|
|
|
: ?check ( cfg -- cfg' )
|
|
|
|
check-optimizer? get [
|
|
|
|
dup check-cfg
|
|
|
|
] when ;
|
|
|
|
|
2009-05-29 14:11:34 -04:00
|
|
|
: optimize-cfg ( cfg -- cfg' )
|
2009-08-08 21:02:56 -04:00
|
|
|
optimize-tail-calls
|
|
|
|
delete-useless-conditionals
|
|
|
|
split-branches
|
|
|
|
join-blocks
|
|
|
|
construct-ssa
|
|
|
|
alias-analysis
|
|
|
|
value-numbering
|
|
|
|
copy-propagation
|
|
|
|
eliminate-dead-code
|
|
|
|
eliminate-write-barriers
|
|
|
|
select-representations
|
|
|
|
destruct-ssa
|
|
|
|
delete-empty-blocks
|
|
|
|
?check ;
|