factor/unfinished/compiler/cfg/linear-scan/linear-scan.factor

31 lines
947 B
Factor
Raw Normal View History

2008-09-10 23:11:03 -04:00
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
2008-09-15 05:22:12 -04:00
USING: kernel accessors
compiler.backend
compiler.cfg
compiler.cfg.linear-scan.live-intervals
compiler.cfg.linear-scan.allocation
compiler.cfg.linear-scan.assignment ;
2008-09-11 03:05:22 -04:00
IN: compiler.cfg.linear-scan
2008-09-10 23:11:03 -04:00
2008-09-17 01:46:38 -04:00
! References:
! Linear Scan Register Allocation
! by Massimiliano Poletto and Vivek Sarkar
! http://www.cs.ucla.edu/~palsberg/course/cs132/linearscan.pdf
! Linear Scan Register Allocation for the Java HotSpot Client Compiler
! by Christian Wimmer
2008-09-15 05:22:12 -04:00
! and http://www.ssw.uni-linz.ac.at/Research/Papers/Wimmer04Master/
2008-09-10 23:11:03 -04:00
2008-09-17 01:46:38 -04:00
! Quality and Speed in Linear-scan Register Allocation
! by Omri Traub, Glenn Holloway, Michael D. Smith
! http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.8435
2008-09-15 05:22:12 -04:00
: linear-scan ( mr -- mr' )
[
dup compute-live-intervals
machine-registers allocate-registers
assign-registers
] change-instructions ;