Register Allocation
Akim Demaille Étienne Renault Roland Levillain first.last@lrde.epita.fr
EPITA — École Pour l’Informatique et les Techniques Avancées
Register Allocation Akim Demaille tienne Renault Roland Levillain - - PowerPoint PPT Presentation
Register Allocation Akim Demaille tienne Renault Roland Levillain first . last @lrde.epita.fr EPITA cole Pour lInformatique et les Techniques Avances May 19, 2018 Register Allocation Interference Graph 1 Coloring by
EPITA — École Pour l’Informatique et les Techniques Avancées
1
2
3
Register Allocation 2 / 98
1
2
3
Register Allocation 3 / 98
a := 0 b := a + 1 c := c + b a := b * 2 a < N return c
Register Allocation 4 / 98
a := 0 b := a + 1 c := c + b a := b * 2 a < N return c
Register Allocation 4 / 98
a := 0 b := a + 1 c := c + b a := b * 2 a < N return c
Register Allocation 4 / 98
Register Allocation 5 / 98
Register Allocation 5 / 98
Register Allocation 5 / 98
1
2
3
Register Allocation 6 / 98
m c d b e j k f h g
Register Allocation 7 / 98
Register Allocation 8 / 98
Register Allocation 9 / 98
Register Allocation 10 / 98
Register Allocation 11 / 98
Register Allocation 12 / 98
Register Allocation 13 / 98
Register Allocation 14 / 98
Register Allocation 15 / 98
Register Allocation 16 / 98
Register Allocation 17 / 98
Register Allocation 18 / 98
Register Allocation 19 / 98
Register Allocation 20 / 98
Register Allocation 21 / 98
Register Allocation 22 / 98
Register Allocation 23 / 98
Register Allocation 24 / 98
Register Allocation 25 / 98
Register Allocation 26 / 98
Register Allocation 27 / 98
Register Allocation 28 / 98
Register Allocation 29 / 98
Register Allocation 29 / 98
Register Allocation 29 / 98
Register Allocation 29 / 98
Register Allocation 30 / 98
Register Allocation 30 / 98
Register Allocation 30 / 98
1
2
3
Register Allocation 31 / 98
Register Allocation 32 / 98
Register Allocation 32 / 98
Register Allocation 32 / 98
Register Allocation 33 / 98
Register Allocation 33 / 98
Register Allocation 33 / 98
Register Allocation 33 / 98
Rebuild the graph if there were any actual spills
Register Allocation 34 / 98
Register Allocation 35 / 98
Register Allocation 35 / 98
Register Allocation 35 / 98
Register Allocation 35 / 98
Register Allocation 35 / 98
Register Allocation 35 / 98
Register Allocation 35 / 98
Register Allocation 35 / 98
Register Allocation 36 / 98
Register Allocation 36 / 98
Register Allocation 36 / 98
Register Allocation 36 / 98
1
2
3
Register Allocation 37 / 98
Register Allocation 38 / 98
Register Allocation 38 / 98
Register Allocation 38 / 98
Register Allocation 39 / 98
Register Allocation 39 / 98
Register Allocation 39 / 98
Register Allocation 40 / 98
Register Allocation 40 / 98
Register Allocation 40 / 98
Register Allocation 40 / 98
Register Allocation 40 / 98
Register Allocation 40 / 98
Register Allocation 40 / 98
Register Allocation 41 / 98
Register Allocation 42 / 98
Register Allocation 43 / 98
Register Allocation 44 / 98
m c&d b j k e f h g
Register Allocation 45 / 98
Register Allocation 46 / 98
Register Allocation 47 / 98
Register Allocation 48 / 98
Register Allocation 49 / 98
Register Allocation 50 / 98
Register Allocation 51 / 98
Register Allocation 52 / 98
Register Allocation 53 / 98
Register Allocation 54 / 98
Register Allocation 55 / 98
Register Allocation 56 / 98
m:2 c&d:1 b:4 j:4 k e:1 f:3 h g
Register Allocation 57 / 98
Register Allocation 58 / 98
Register Allocation 59 / 98
Register Allocation 60 / 98
Register Allocation 61 / 98
Register Allocation 62 / 98
1
2
3
Register Allocation 63 / 98
Register Allocation 64 / 98
Register Allocation 64 / 98
Register Allocation 64 / 98
Register Allocation 64 / 98
Register Allocation 64 / 98
Register Allocation 65 / 98
Register Allocation 65 / 98
Register Allocation 65 / 98
Register Allocation 65 / 98
Register Allocation 66 / 98
Register Allocation 67 / 98
r1 r2 a c d r3 b e
Register Allocation 68 / 98
r1 r2 a c d r3 b e
Register Allocation 69 / 98
r1 r2 c d r3 b a&e
Register Allocation 70 / 98
r1 c d b&r2 r3 a&e
Register Allocation 71 / 98
Register Allocation 72 / 98
Register Allocation 73 / 98
Register Allocation 74 / 98
r1:1 c d:3 b&r2 r3 a&e:1
Register Allocation 75 / 98
r1:1 r2:2 c d:3 r3 b:2 a&e:1
Register Allocation 76 / 98
r1:1 r2:2 a:1 c d:3 r3 b:2 e:1
Register Allocation 77 / 98
r1:1 r2:2 a:1 c:4 d:3 r3 b:2 e:1
Register Allocation 78 / 98
Register Allocation 79 / 98
r1 r2 a d r3 b e c1 c2
Register Allocation 80 / 98
r1 r2 a d b c1&r3 c2 e
Register Allocation 81 / 98
r1 r2 a d b c1&r3&c2 e
Register Allocation 82 / 98
Register Allocation 83 / 98
Register Allocation 84 / 98
Register Allocation 85 / 98
Register Allocation 86 / 98
Register Allocation 87 / 98
Register Allocation 88 / 98
Register Allocation 89 / 98
r1:1 r2:2 a:1 d:3 b:2 c1&r3&c2 e:1
Register Allocation 90 / 98
r1:1 r2:2 a:1 d:3 b:2 c1&r3:3 c2:3 e:1
Register Allocation 91 / 98
r1:1 r2:2 a:1 d:3 r3:3 b:2 e:1 c1:3 c2:3
Register Allocation 92 / 98
Register Allocation 93 / 98
1
2
3
Register Allocation 94 / 98
Register Allocation 95 / 98
Register Allocation 95 / 98
Register Allocation 95 / 98
Register Allocation 95 / 98
Register Allocation 95 / 98
Register Allocation 95 / 98
Register Allocation 95 / 98
1
2
3
Register Allocation 96 / 98
Register Allocation 97 / 98
Register Allocation 98 / 98