13 - Graph Coloring Register Allocation Rematerialization...

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

View Full Document Right Arrow Icon
Graph Coloring Register Allocation Last Time Chaitin et al. Briggs et al. Today Finish Briggs et al. basics An improvement: rematerialization CS 380C Lecture 13 1 Register Allocation Rematerialization Some expressions are especially simple to recompute: Operands are constant (though not necessarily known) Operands are available globally Chaitin calls these expressions never-killed Typical examples include: Constant Constant + frame pointer Load of constant parameter Load from constant pool Access through display CS 380C Lecture 13 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
Rematerialization We should recognize that these are cheaper before we try to color Helps resolve spill choices correctly Original p 123 y y +[ p ] p p + 1 Ideal p 123 y y p ] p 123 p p + 1 CS 380C Lecture 13 3 Register Allocation What we get Chaitin p 123 spill p reload p y y p ] reload p p p + 1 spill p Chow - Spitting p 123 spill p reload p y y p ] reload p p p + 1 CS 380C Lecture 13 4 Register Allocation
Background image of page 2
Live Ranges and Values Chaitin’s allocator works with live ranges Al iverangemayinc ludemany values, connected by common uses A value corresponds to a single defnition, including the merge oF two values You should be thinking: Hmmm, smells like SSA or something, . . . Chaitin’s allocator can handle rematerializing a live range with a single value CS 380C Lecture 13 5 Register Allocation The Plan To discover and isolate rematerializable values: ±ind values (use pruned SSA graph)
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 / 8

13 - Graph Coloring Register Allocation Rematerialization...

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