parent
e6ce2eb455
commit
dcb0cc8da7
|
@ -1,7 +1,7 @@
|
||||||
! 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 hashtables kernel namespaces sequences
|
USING: accessors assocs hashtables kernel namespaces sequences
|
||||||
sequences.extras sets
|
sets
|
||||||
compiler.cfg
|
compiler.cfg
|
||||||
compiler.cfg.dataflow-analysis
|
compiler.cfg.dataflow-analysis
|
||||||
compiler.cfg.def-use
|
compiler.cfg.def-use
|
||||||
|
@ -24,9 +24,12 @@ M: avail transfer-set drop defined assoc-union ;
|
||||||
|
|
||||||
: available? ( vn -- ? ) basic-block get avail-in key? ;
|
: available? ( vn -- ? ) basic-block get avail-in key? ;
|
||||||
|
|
||||||
|
: best-vreg ( available-vregs -- vreg )
|
||||||
|
[ f ] [ infimum ] if-empty ;
|
||||||
|
|
||||||
: >avail-vreg ( vreg -- vreg/f )
|
: >avail-vreg ( vreg -- vreg/f )
|
||||||
final-iteration? get [
|
final-iteration? get [
|
||||||
congruence-class [ available? ] filter ?infimum
|
congruence-class [ available? ] filter best-vreg
|
||||||
] when ;
|
] when ;
|
||||||
|
|
||||||
: available-uses? ( insn -- ? )
|
: available-uses? ( insn -- ? )
|
||||||
|
|
Loading…
Reference in New Issue