1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel accessors namespaces make
6 compiler.cfg.instructions
7 compiler.cfg.linear-scan.live-intervals
8 compiler.cfg.linear-scan.allocation
9 compiler.cfg.linear-scan.assignment ;
10 IN: compiler.cfg.linear-scan
14 ! Linear Scan Register Allocation
15 ! by Massimiliano Poletto and Vivek Sarkar
16 ! http://www.cs.ucla.edu/~palsberg/course/cs132/linearscan.pdf
18 ! Linear Scan Register Allocation for the Java HotSpot Client Compiler
20 ! and http://www.ssw.uni-linz.ac.at/Research/Papers/Wimmer04Master/
22 ! Quality and Speed in Linear-scan Register Allocation
23 ! by Omri Traub, Glenn Holloway, Michael D. Smith
24 ! http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.8435
26 : (linear-scan) ( insns -- insns' )
27 dup compute-live-intervals
28 machine-registers allocate-registers assign-registers ;
30 : linear-scan ( mr -- mr' )
35 spill-counts get _spill-counts