12 - Where we are Register Allocation via Graph Coloring...

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

View Full Document Right Arrow Icon
Where we are Course so far Program representation Data fow analysis SSA Optimizations Scheduling (just breezed the surFace) On the Horizon Register Allocation Compilers For Object-oriented languages: JIT, GC, locality Experimental Computer Science in a modern context Aliases (brieF) Interprocedural Analysis (brieF) Dependence, Parallelism, & Locality analysis (intro) Next generation architectures Today Register Allocation Chaitin et al. Graph Coloring Register Allocation CS 380C Lecture 12 1 Graph Coloring Allocation Register Allocation via Graph Coloring The abstraction G. J. Chaitin, M. A. Auslander, A. K. Chandra, J. Cocke, M. E. Hopkins, and P. W. Markstein, “Register Allocation via Coloring,” Computer Languages ,6(1) ,Janua ry1981 . P. Briggs, K. Cooper, and L. Torczon, “Improvements to Graph Coloring Register Allocation,” Transactions on Programming Languages and Systems ,16(3) ,May1994 . ±. Chow and J. Hennessy, “The Priority-Based Coloring Approach to Register Allocation,” Transactions on Programming Languages and Systems, 12(4), October 1990. Traub, Holloway, and Smith, “Quality and Speed in Linear-scan Register Allocation,” ACM SIGPLAN ’98 Conference on Programming Language Design and Implementation, June 1998, pp. 142-151. CS 380C Lecture 12 2 Graph Coloring 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
Registers Registers Cache TLB RAM Disk 32 integer 32 floating point 32K-512K bytes 256 pages 1-2 GB 10-100+ GB CS 380C Lecture 12 3 Graph Coloring Allocation Register Allocation Backus et al. suggested a simplifying separation of concerns: During optimization, assume an infnite set oF registers; treat register allocation as a separate problem. Register allocation may be performed at many levels: Expression Local (basic block) Loop Global (method) Interprocedural = Global optimization requires global register allocation. Assumptions low-level intermediate or assembly code Unlimited number of virtual registers global optimization has been performed CS 380C Lecture 12 4 Graph Coloring Allocation
Background image of page 2
What’s Hard? Control fow, especially loops Machine dependent 2- and 3-address instructions Calling conventions (caller saves vs. callee saves) Restricted instructions Register pairs Finally, there are practical considerations – space and time. Graph coloring o±ers a simpli²ying abstraction. CS 380C Lecture 12 5 Graph Coloring Allocation Allocation via Coloring A value corresponds to a de³nition, A live range is composed o² one or more values, connected by common uses. based on stmts A single virtual register name may comprise several live ranges An interference graph is constructed, where Vertices represent live ranges.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
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 / 12

12 - Where we are Register Allocation via Graph Coloring...

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

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