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.liveness
10 compiler.cfg.linear-scan.live-intervals
11 compiler.cfg.linear-scan.allocation
12 compiler.cfg.linear-scan.allocation.state
13 compiler.cfg.linear-scan.assignment
14 compiler.cfg.linear-scan.resolve
15 compiler.cfg.linear-scan.mapping ;
16 IN: compiler.cfg.linear-scan
20 ! Linear Scan Register Allocation
21 ! by Massimiliano Poletto and Vivek Sarkar
22 ! http://www.cs.ucla.edu/~palsberg/course/cs132/linearscan.pdf
24 ! Linear Scan Register Allocation for the Java HotSpot Client Compiler
26 ! and http://www.ssw.uni-linz.ac.at/Research/Papers/Wimmer04Master/
28 ! Quality and Speed in Linear-scan Register Allocation
29 ! by Omri Traub, Glenn Holloway, Michael D. Smith
30 ! http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.8435
32 :: (linear-scan) ( cfg machine-registers -- )
34 cfg number-instructions
35 cfg compute-live-intervals machine-registers allocate-registers
40 : linear-scan ( cfg -- cfg' )
43 dup machine-registers (linear-scan)
44 spill-counts get >>spill-counts