Add tool to dump live intervals
parent
22f11f24c9
commit
c8521ad826
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors kernel sequences sets arrays
|
USING: accessors kernel sequences sets arrays math strings fry
|
||||||
compiler.cfg.linear-scan.live-intervals
|
prettyprint compiler.cfg.linear-scan.live-intervals
|
||||||
compiler.cfg.linear-scan.allocation ;
|
compiler.cfg.linear-scan.allocation ;
|
||||||
IN: compiler.cfg.linear-scan.debugger
|
IN: compiler.cfg.linear-scan.debugger
|
||||||
|
|
||||||
|
@ -21,3 +21,16 @@ IN: compiler.cfg.linear-scan.debugger
|
||||||
: check-linear-scan ( live-intervals machine-registers -- )
|
: check-linear-scan ( live-intervals machine-registers -- )
|
||||||
[ [ clone ] map ] dip allocate-registers
|
[ [ clone ] map ] dip allocate-registers
|
||||||
[ split-children ] map concat check-assigned ;
|
[ split-children ] map concat check-assigned ;
|
||||||
|
|
||||||
|
: picture ( uses -- str )
|
||||||
|
dup peek 1 + CHAR: space <string>
|
||||||
|
[ '[ CHAR: * swap _ set-nth ] each ] keep ;
|
||||||
|
|
||||||
|
: interval-picture ( interval -- str )
|
||||||
|
[ uses>> picture ]
|
||||||
|
[ copy-from>> unparse ]
|
||||||
|
[ vreg>> unparse ]
|
||||||
|
tri 3array ;
|
||||||
|
|
||||||
|
: live-intervals. ( seq -- )
|
||||||
|
[ interval-picture ] map simple-table. ;
|
||||||
|
|
Loading…
Reference in New Issue