Concatenative language
Other languages
Topics
Meta
= Linear scan = The _linear scan_ algorithm sacrifices code quality for compilation speed; it only needs to make one or two passes over the intermediate representation to assign registers, and therefore runs in O(n) time; therefore it is much faster than graph coloring, which runs in O(n^2) time. - *Linear Scan Register Allocation*, 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, [[http://www.ssw.uni-linz.ac.at/Research/Papers/Wimmer04Master/]] - *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]] = Graph coloring = _Graph coloring_ is traditionally implemented by building an interference graph, attempting to color it, and if coloring fails, spilling some values and building the interference graph again. Building the graph is pretty expensive; if your program is in SSA form, it turns out you can perform spilling, build the graph and color it all in one shot. - *Register allocation for programs in SSA form using chordal graph coloring*, Sebastian Hack, [[http://digbib.ubka.uni-karlsruhe.de/volltexte/documents/6532]]
Describe this revision:
Save