2008 · 63 citations · 33 references
ComputingComputer EngineeringComputer ScienceAlgorithmsCompilersComputer ArchitectureCode GenerationCompiler ConstructionControl-flow AnalysisData-flow AnalysisInstruction Set ArchitectureRegister AllocationCompiler SupportLinear Scan Register AllocationPolynomial Time ComplexityPolynomial-time AlgorithmsPolynomial-time ReductionsPuzzle GenerationRegister AssignmentRegister Coalescing
We show that register allocation can be viewed as solving a collection of puzzles. We model the register file as a puzzle board and the program variables as puzzle pieces; pre-coloring and register aliasing fit in naturally. For architectures such as PowerPC, x86, and StrongARM, we can solve the puzzles in polynomial time, and we have augmented the puzzle solver with a simple heuristic for spilling. For SPEC CPU2000, the compilation time of our implementation is as fast as that of the extended version of linear scan used by LLVM, which is the JIT compiler in the openGL stack of Mac OS 10.5. Our implementation produces x86 code that is of similar quality to the code produced by the slower, state-of-the-art iterated register coalescing of George and Appel with the extensions proposed by Smith, Ramsey, and Holloway in 2004.
33
Adhi Harmoko S, M.Komp, Joseph Marie Jacquard et al. · 2005 · 18.4K citations
V. J. Rayward‐Smith, Thomas H. Cormen, Charles E. Leiserson et al. · Journal of the Operational Research Society · 1991 · 17K citations
A study of replacement algorithms for a virtual-storage computer
L. A. Belady · IBM Systems Journal · 1966 · 1.7K citations
Register allocation via coloring
Gregory J. Chaitin, Marc Auslander, Ashok K. Chandra et al. · Computer Languages · 1981 · 731 citations