14 - Register Allocation Motivation Fast compilation times are becoming increasingly important Previously Graph Coloring Allocators Chaitin style

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Register Allocation Previously Graph Coloring Allocators Chaitin style Briggs enhancements Today Linear-scan Register Allocation Traub, Holloway, and Smith CS 380C Lecture 14 1 Register Allocation Motivation Fast compilation times are becoming increasingly important dynamic compilation (JIT) whole program optimization production compilers Register allocation is often a bottleneck Non-linear (sometimes not even a low polynomial) Inlining exacerbates its problems Good register allocation is key to attaining peak processor performance. Quality of code vs. Speed of allocation CS 380C Lecture 14 2 Register Allocation
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Linear Scan Register Allocation compute live information same way traverse the program in a linear order (rPostOrder) 6 4 3 2 5 1 process candidates as they appear (or in rank order) heuristically choose candidates to spill = runs in linear time Examples Digital’s Gem compiler Jikes RVM Scale tcc dynamic code generation project Traub et al. CS 380C Lecture 14 3 Register Allocation Computing Live Information “Temporaries” - allocation candidates program variables compiler-generated temporaries Temporary live ranges interval in “linear order” in which the temporary is live the interval is at the granularity of instructions and basic blocks Live range holes interval during which no useful value is maintained e.g., interval between a use and the next deFnition Compute live information in a single reverse pass.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/09/2012 for the course CS 380 taught by Professor Shmat during the Fall '08 term at University of Texas at Austin.

Page1 / 8

14 - Register Allocation Motivation Fast compilation times are becoming increasingly important Previously Graph Coloring Allocators Chaitin style

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online