1 ! Copyright (C) 2008, 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel accessors namespaces make locals
7 compiler.cfg.instructions
8 compiler.cfg.linear-scan.numbering
9 compiler.cfg.linear-scan.live-intervals
10 compiler.cfg.linear-scan.allocation
11 compiler.cfg.linear-scan.allocation.state
12 compiler.cfg.linear-scan.assignment
13 compiler.cfg.linear-scan.resolve
14 compiler.cfg.linear-scan.mapping ;
15 IN: compiler.cfg.linear-scan
19 ! Linear Scan Register Allocation
20 ! by Massimiliano Poletto and Vivek Sarkar
21 ! http://www.cs.ucla.edu/~palsberg/course/cs132/linearscan.pdf
23 ! Linear Scan Register Allocation for the Java HotSpot Client Compiler
25 ! and http://www.ssw.uni-linz.ac.at/Research/Papers/Wimmer04Master/
27 ! Quality and Speed in Linear-scan Register Allocation
28 ! by Omri Traub, Glenn Holloway, Michael D. Smith
29 ! http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.8435
31 :: (linear-scan) ( rpo machine-registers -- )
32 rpo number-instructions
33 rpo compute-live-intervals machine-registers allocate-registers
38 : linear-scan ( cfg -- cfg' )
41 dup reverse-post-order machine-registers (linear-scan)
42 spill-counts get >>spill-counts