Acyclic orientation graph coloring for software-managed memory allocation

Li Wang, JingLing Xue, XueJun Yang
2014 Science China Information Sciences  
This paper presents a novel compiler algorithm, called acyclic orientation graph coloring (AOG coloring), for managing data objects in software-managed memory allocation. The key insight is that softwaremanaged memory allocation could be solved as an interval coloring problem, or equivalently, an acyclic orientation problem. We generalize graph coloring register allocation to interval coloring memory allocation by maintaining an acyclic orientation to the currently colored subgraph. This is
more » ... eved with some well-crafted heuristics, including Aggressive Simplify that does not necessarily preserve colorability and Best-Fit Select that assigns intervals (i.e., colors) to nodes by possibly adjusting the colors already assigned to other nodes earlier. Our algorithm generalizes and subsumes as a special case the classical graph coloring register allocation algorithm without notably increased complexity: it deals with memory allocation while preserving the elegance and practicality of traditional graph coloring register allocation. We have implemented our algorithm and tested it on Appel's 27921 interference graphs for scalars (augmented with node weights). Our algorithm outperforms Memory Coloring, the best in the literature, for software-managed memory allocation, on 98.64% graphs, in which, the gaps are more than 20% on 68.31% graphs and worse only on 0.29% graphs. We also tested it on all the 73 DIMACS weighted benchmarks (weighted graphs), AOG Coloring outperforms Memory Coloring on all of the benchmarks, in which, the gaps are more than 20% on 83.56% graphs.
doi:10.1007/s11432-014-5131-7 fatcat:ukvx3nd2cnhm3imk2cfegwjpve