Title :
Post register allocation spill code optimization
Author :
Lupo, Christopher ; Wilken, Kent D.
Author_Institution :
Dept. of Electr. & Comput. Eng., California Univ., Davis, CA, USA
Abstract :
A highly optimized register allocator should provide an efficient placement of save/restore code for procedures that contain calls. This paper presents a new approach to placing callee-saved save and restore instructions that generalizes Chow´s shrink-wrapping technique (Chow, 1988). An efficient, profile-guided, hierarchical spill code placement algorithm is used to analyze the structure of a procedure to calculate the minimum dynamic execution count locations to place callee-saved save and restore code. The algorithm is implemented in the Gnu Compiler Collection and has been tested on the SPEC CPU2000 Integer Benchmark suite. Results show that the technique reduces the number of dynamic load and store instructions by 15% compared to saving and restoring at procedure entry and exit while Chow´s shrink-wrapping technique reduces dynamic load and store instructions by only 1% compared to saving and restoring at procedure entry and exit. The dynamic number of callee-saved save and restore instructions inserted with this new approach is never greater than the number produced by Chow´s shrink-wrapping technique or the placement at procedure entry and exit.
Keywords :
optimising compilers; remote procedure calls; Gnu Compiler Collection; SPEC CPU2000 Integer Benchmark; callee-saved save restore instructions; dynamic load instruction; dynamic store instruction; hierarchical spill code placement algorithm; optimized register allocator; post register allocation spill code optimization; save/restore code; shrink-wrapping technique; Algorithm design and analysis; Benchmark testing; Cost function; Registers;
Conference_Titel :
Code Generation and Optimization, 2006. CGO 2006. International Symposium on
Print_ISBN :
0-7695-2499-0
DOI :
10.1109/CGO.2006.28