SlideShare a Scribd company logo
Register Allocation

Guido Wachsmuth




       Delft
                              Course IN4303, 2012/13
       University of
       Technology               Compiler Construction
       Challenge the future
Overview
today’s lecture

interference graphs

  •   construction during liveness analysis




                                              Register Allocation   2
Overview
today’s lecture

interference graphs

  •   construction during liveness analysis

graph colouring

  •   assign registers to local variables and compiler temporaries
  •   store local variables and temporaries in memory




                                                          Register Allocation   2
Overview
today’s lecture

interference graphs

  •   construction during liveness analysis

graph colouring

  •   assign registers to local variables and compiler temporaries
  •   store local variables and temporaries in memory

coalescing

  •   handle move instructions




                                                          Register Allocation   2
Overview
today’s lecture

interference graphs

  •   construction during liveness analysis

graph colouring

  •   assign registers to local variables and compiler temporaries
  •   store local variables and temporaries in memory

coalescing

  •   handle move instructions

pre-coloured nodes


                                                          Register Allocation   2
I
interference graphs




                      Register Allocation   3
Recap: Liveness analysis
terminology

              a ← 0


              b ← a + 1


              c ← c + b


              a ← 2 * b


              if a < N


              return c


                           Register Allocation   4
Recap: Liveness analysis
terminology

definition    a ← 0


              b ← a + 1


              c ← c + b


              a ← 2 * b


              if a < N


              return c


                           Register Allocation   4
Recap: Liveness analysis
terminology

definition    a ← 0


usage         b ← a + 1


              c ← c + b


              a ← 2 * b


              if a < N


              return c


                           Register Allocation   4
Recap: Liveness analysis
terminology

definition    a ← 0


usage         b ← a + 1


              c ← c + b


definition    a ← 2 * b


              if a < N


              return c


                           Register Allocation   4
Recap: Liveness analysis
terminology

definition    a ← 0


usage         b ← a + 1


              c ← c + b


definition    a ← 2 * b


usage         if a < N


              return c


                           Register Allocation   4
Recap: Liveness analysis
terminology

definition    a ← 0


usage         b ← a + 1


              c ← c + b


definition    a ← 2 * b

                                   live-in
usage         if a < N


              return c


                           Register Allocation   4
Recap: Liveness analysis
terminology

definition    a ← 0


usage         b ← a + 1


              c ← c + b


definition    a ← 2 * b
                           live-out

                                       live-in
usage         if a < N


              return c


                               Register Allocation   4
Recap: Liveness analysis
terminology

definition    a ← 0

                           live-in
usage         b ← a + 1


              c ← c + b


definition    a ← 2 * b
                           live-out

                                       live-in
usage         if a < N


              return c


                               Register Allocation   4
Recap: Liveness analysis
terminology

definition    a ← 0

                           live-in
usage         b ← a + 1


              c ← c + b


definition    a ← 2 * b
                           live-out

                                       live-in
usage         if a < N
                           live-out

              return c


                               Register Allocation   4
Recap: Liveness analysis
terminology

definition    a ← 0        live-out

                           live-in
usage         b ← a + 1


              c ← c + b


definition    a ← 2 * b
                           live-out

                                       live-in
usage         if a < N
                           live-out

              return c


                               Register Allocation   4
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Recap: Liveness analysis
example

             a ← 0


             b ← a + 1


             c ← c + b


             a ← 2 * b


             if a < N


             return c


                           Register Allocation   5
Interference graphs
example

   a ← 0


   b ← a + 1


   c ← c + b


   a ← 2 * b


   if a < N


   return c


                      Register Allocation   6
Interference graphs
example

   a ← 0


   b ← a + 1

                      a              b
   c ← c + b


   a ← 2 * b
                          c

   if a < N


   return c


                              Register Allocation   6
Interference graphs
example

   a ← 0


   b ← a + 1

                      a              b
   c ← c + b


   a ← 2 * b
                          c

   if a < N


   return c


                              Register Allocation   6
Interference graphs
example

   a ← 0


   b ← a + 1

                      a              b
   c ← c + b


   a ← 2 * b
                          c

   if a < N


   return c


                              Register Allocation   6
II
graph colouring




                  Register Allocation   7
Graph colouring
example

   a ← 0


   b ← a + 1

                  a                b
   c ← c + b


   a ← 2 * b
                      c

   if a < N


   return c


                          Register Allocation   8
Graph colouring
example

   a ← 0


   b ← a + 1

                  a                b
   c ← c + b


   a ← 2 * b
                      c

   if a < N


   return c


                          Register Allocation   8
Graph colouring
example

   a ← 0


   b ← a + 1

                  a                b
   c ← c + b


   a ← 2 * b
                      c

   if a < N


   return c


                          Register Allocation   8
Graph colouring
example

   a ← 0


   b ← a + 1

                  a                b
   c ← c + b


   a ← 2 * b
                      c

   if a < N


   return c


                          Register Allocation   8
Graph colouring
example

 r1 ← 0


 r1 ← r1 + 1

                  a                b
 r2 ← r2 + r1


 r1 ← 2 * r1
                      c

 if r1 < N


 return r2


                          Register Allocation   9
Graph colouring
steps

simplify
        remove node of insignificant degree (fewer than k edges)

spill
        remove node with k or more edges

select
        add node, select colour




                                                             Register Allocation 10
Graph colouring
example with 2 colours



             a           b




                 c




                             Register Allocation 11
Graph colouring
example with 2 colours



             a           b




                 c



                                    a




                             Register Allocation 11
Graph colouring
example with 2 colours



             a           b




                 c

                                    c

                                    a




                             Register Allocation 11
Graph colouring
example with 2 colours



             a           b




                 c

                                    c

                                    a




                             Register Allocation 11
Graph colouring
example with 2 colours



             a           b




                 c



                                    a




                             Register Allocation 11
Graph colouring
example with 2 colours



             a           b




                 c




                             Register Allocation 11
Graph colouring
example with 4 colours

                    f



                    e




 j     k                 b         m




 h     g                 d         c



                             Register Allocation 12
Graph colouring
example with 4 colours

                    f



                    e




 j     k                 b         m




 h     g                 d         c                  g



                             Register Allocation 13
Graph colouring
example with 4 colours

                    f



                    e




 j     k                 b         m

                                                      h

 h     g                 d         c                  g



                             Register Allocation 14
Graph colouring
example with 4 colours

                    f



                    e




 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 15
Graph colouring
example with 4 colours

                    f



                    e

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 16
Graph colouring
example with 4 colours

                    f



                    e                                 j

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 17
Graph colouring
example with 4 colours

                    f
                                                      e

                    e                                 j

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 18
Graph colouring
example with 4 colours
                                                      f
                    f
                                                      e

                    e                                 j

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 19
Graph colouring
example with 4 colours                                b

                                                      f
                    f
                                                      e

                    e                                 j

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 20
Graph colouring                                       c

example with 4 colours                                b

                                                      f
                    f
                                                      e

                    e                                 j

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 21
Graph colouring                                       c

example with 4 colours                                b

                                                      f
                    f
                                                      e

                    e                                 j

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 22
Graph colouring
example with 4 colours                                b

                                                      f
                    f
                                                      e

                    e                                 j

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 23
Graph colouring
example with 4 colours
                                                      f
                    f
                                                      e

                    e                                 j

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 24
Graph colouring
example with 4 colours

                    f
                                                      e

                    e                                 j

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 25
Graph colouring
example with 4 colours

                    f



                    e                                 j

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 26
Graph colouring
example with 4 colours

                    f



                    e

                                                      d

 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 27
Graph colouring
example with 4 colours

                    f



                    e




 j     k                 b         m                  k

                                                      h

 h     g                 d         c                  g



                             Register Allocation 28
Graph colouring
example with 4 colours

                    f



                    e




 j     k                 b         m

                                                      h

 h     g                 d         c                  g



                             Register Allocation 29
Graph colouring
example with 4 colours

                    f



                    e




 j     k                 b         m




 h     g                 d         c                  g



                             Register Allocation 30
Graph colouring
example with 4 colours

                    f



                    e




 j     k                 b         m




 h     g                 d         c



                             Register Allocation 31
Optimistic colouring
steps

simplify
        remove node of insignificant degree (fewer than k edges)

spill
        remove node of significant degree (k or more edges)

select
        add node, select colour




                                                              Register Allocation 32
Optimistic colouring
example with 2 colours

                 d




             a           b




                 c




                             Register Allocation 33
Optimistic colouring
example with 2 colours

                 d




             a           b




                 c

                                    a




                             Register Allocation 33
Optimistic colouring
example with 2 colours

                 d




             a           b




                 c

                             potential spill          a




                                               Register Allocation 33
Optimistic colouring
example with 2 colours

                 d




             a           b



                                                      c
                 c

                             potential spill          a




                                               Register Allocation 33
Optimistic colouring
example with 2 colours

                 d




             a           b

                                                      b

                                                      c
                 c

                             potential spill          a




                                               Register Allocation 33
Optimistic colouring
example with 2 colours

                 d




             a           b

                                                      b

                                                      c
                 c

                             potential spill          a




                                               Register Allocation 33
Optimistic colouring
example with 2 colours

                 d




             a           b



                                                      c
                 c

                             potential spill          a




                                               Register Allocation 33
Optimistic colouring
example with 2 colours

                 d




             a           b




                 c

                             potential spill          a




                                               Register Allocation 33
Optimistic colouring
example with 2 colours

                 d




             a           b




                 c




                             Register Allocation 33
Spilling
steps

simplify
        remove node of insignificant degree (less than k edges)

spill
        remove node of significant degree (k or more edges)

select
        add node, select colour

actual spill

start over

                                                              Register Allocation 34
Spilling
example with 2 colours



             a           b




                 c




                             Register Allocation 35
Spilling
example with 2 colours



             a           b




                 c



                             potential spill          a




                                               Register Allocation 35
Spilling
example with 2 colours



             a           b




                 c

                                                      c

                             potential spill          a




                                               Register Allocation 35
Spilling
example with 2 colours



             a           b




                 c

                                                      c

                             potential spill          a




                                               Register Allocation 35
Spilling
example with 2 colours



             a           b




                 c



                             potential spill          a




                                               Register Allocation 35
Spilling
example with 2 colours



             a           b




                 c



                             actual spill          a




                                            Register Allocation 35
Spilling
example

           a ← 1


           b ← a + 1


           c ← b + 1


           a ← c + a


           return b




                       Register Allocation 36
Spilling
example

  a1 ← 1       a ← 1

  M[42] ← a1
               b ← a + 1


               c ← b + 1


               a ← c + a


               return b




                           Register Allocation 36
Spilling
example

  a1 ← 1       a ← 1

  M[42] ← a1
               b ← a + 1   a2 ← M[42]

                           b ← a2 + 1
               c ← b + 1


               a ← c + a


               return b




                                   Register Allocation 36
Spilling
example

  a1 ← 1        a ← 1

  M[42] ← a1
                b ← a + 1   a2 ← M[42]

                            b ← a2 + 1
                c ← b + 1
  a3 ← M[42]

  a4 ← c + a3   a ← c + a

  M[42] ← a4
                return b




                                    Register Allocation 36
Spilling
example

  a1 ← 1        a ← 1

  M[42] ← a1
                b ← a + 1   a2 ← M[42]

                            b ← a2 + 1
                c ← b + 1
  a3 ← M[42]

  a4 ← c + a3   a ← c + a

  M[42] ← a4
                return b




                                    Register Allocation 37
Spilling
example

  a1 ← 1        a ← 1

  M[42] ← a1
                b ← a + 1   a2 ← M[42]

                            b ← a2 + 1
                c ← b + 1
  a3 ← M[42]

  a4 ← c + a3   a ← c + a

  M[42] ← a4
                return b




                                    Register Allocation 37
Spilling
example

  a1 ← 1        a ← 1

  M[42] ← a1
                b ← a + 1   a2 ← M[42]

                            b ← a2 + 1
                c ← b + 1
  a3 ← M[42]

  a4 ← c + a3   a ← c + a

  M[42] ← a4
                return b




                                    Register Allocation 37
Spilling
example

  a1 ← 1        a ← 1

  M[42] ← a1
                b ← a + 1   a2 ← M[42]

                            b ← a2 + 1
                c ← b + 1
  a3 ← M[42]

  a4 ← c + a3   a ← c + a

  M[42] ← a4
                return b




                                    Register Allocation 37
Spilling
example

  a1 ← 1        a ← 1

  M[42] ← a1
                b ← a + 1   a2 ← M[42]

                            b ← a2 + 1
                c ← b + 1
  a3 ← M[42]

  a4 ← c + a3   a ← c + a

  M[42] ← a4
                return b




                                    Register Allocation 37
Spilling
example

           a ← 1


           b ← a + 1


           c ← b + 1


           a ← c + a


           return b




                       Register Allocation 38
Spilling
example

               a ← 1


               b ← a + 1


  b2 ← M[42]   c ← b + 1

  c ← b2 + 1
               a ← c + a


               return b




                           Register Allocation 38
Spilling
example

               a ← 1


               b ← a + 1   b1 ← a + 1

                           M[42] ← b1
  b2 ← M[42]   c ← b + 1

  c ← b2 + 1
               a ← c + a


               return b




                                   Register Allocation 38
Spilling
example

               a ← 1


               b ← a + 1   b1 ← a + 1

                           M[42] ← b1
  b2 ← M[42]   c ← b + 1

  c ← b2 + 1
               a ← c + a


               return b    b3 ← M[42]

                           return b3



                                       Register Allocation 38
Spilling
example

               a ← 1


               b ← a + 1   b1 ← a + 1

                           M[42] ← b1
  b2 ← M[42]   c ← b + 1

  c ← b2 + 1
               a ← c + a


               return b    b3 ← M[42]

                           return b3



                                       Register Allocation 39
Spilling
example

               a ← 1


               b ← a + 1   b1 ← a + 1

                           M[42] ← b1
  b2 ← M[42]   c ← b + 1

  c ← b2 + 1
               a ← c + a


               return b    b3 ← M[42]

                           return b3



                                       Register Allocation 39
Spilling
example

               a ← 1


               b ← a + 1   b1 ← a + 1

                           M[42] ← b1
  b2 ← M[42]   c ← b + 1

  c ← b2 + 1
               a ← c + a


               return b    b3 ← M[42]

                           return b3



                                       Register Allocation 39
Spilling
example

               a ← 1


               b ← a + 1   b1 ← a + 1

                           M[42] ← b1
  b2 ← M[42]   c ← b + 1

  c ← b2 + 1
               a ← c + a


               return b    b3 ← M[42]

                           return b3



                                       Register Allocation 39
Spilling
example

               a ← 1


               b ← a + 1   b1 ← a + 1

                           M[42] ← b1
  b2 ← M[42]   c ← b + 1

  c ← b2 + 1
               a ← c + a


               return b    b3 ← M[42]

                           return b3



                                       Register Allocation 39
coffee break




               Register Allocation 40
III
coalescing




             Register Allocation 41
Recap: graph colouring
example

               f



               e




j     k                  b         m




h     g                  d         c



                             Register Allocation 42
Recap: graph colouring
example

               f



               e




j     k                  b         m




h     g                  d         c



                             Register Allocation 42
Recap: graph colouring
example

               f



               e




j     k                  b         m




h     g                  d         c



                             Register Allocation 42
Coalescing
better solution

                  f



                  e




 j     k              b         m




 h     g              d         c



                          Register Allocation 43
Coalescing
better solution

                  f



                  e




 j     k              b         m




 h     g              d         c



                          Register Allocation 43
Coalescing
better solution

                  f



                  e




 j     k              b         m




 h     g              d         c



                          Register Allocation 43
Coalescing
coalescing nodes

                   f



                   e




j/b    k                      m




 h     g               c/d



                        Register Allocation 44
Coalescing
conservative strategies

Briggs

  •      a/b has fewer than k neighbours of significant degree

  •      nodes of insignificant degree and a/b can be simplified

  •      remaining graph is colourable

George

  •      all neighbours of a of significant degree interfere also with b

  •      neighbours of a of insignificant degree can be simplified

  •      subgraph of original graph is colourable



                                                               Register Allocation 45
Graph colouring
steps

simplify
        remove non-move-related node of insignificant degree

coalesce

freeze
        turn move-related node of insignificant degree into non-move-related

spill

select

start over

                                                               Register Allocation 46
Coalescing
example

             f



             e




j     k          b         m




h     g          d         c



                     Register Allocation 47
Coalescing
example

             f



             e




j     k          b         m




h     g          d         c                  g



                     Register Allocation 48
Coalescing
example

             f



             e




j     k          b         m

                                              h

h     g          d         c                  g



                     Register Allocation 49
Coalescing
example

             f



             e




j     k          b         m                  k

                                              h

h     g          d         c                  g



                     Register Allocation 50
Coalescing
example

             f



             e




j     k          b          m                  k

                                               h

h     g              c/d                       g



                      Register Allocation 51
Coalescing
example

             f



             e




j/b   k                 m                  k

                                           h

 h    g          c/d                       g



                  Register Allocation 52
Coalescing
example

             f



             e

                                      c/d

j/b   k                 m                  k

                                           h

 h    g          c/d                       g



                  Register Allocation 53
Coalescing
example

             f



             e                        j/b

                                      c/d

j/b   k                 m                  k

                                           h

 h    g          c/d                       g



                  Register Allocation 54
Coalescing
example

             f
                                           f

             e                        j/b

                                      c/d

j/b   k                 m                  k

                                           h

 h    g          c/d                       g



                  Register Allocation 55
Coalescing
example
                                           m
             f
                                           f

             e                        j/b

                                      c/d

j/b   k                 m                  k

                                           h

 h    g          c/d                       g



                  Register Allocation 56
Coalescing
example
                                           m
             f
                                           f

             e                        j/b

                                      c/d

j/b   k                 m                  k

                                           h

 h    g          c/d                       g



                  Register Allocation 57
Coalescing
example

             f
                                           f

             e                        j/b

                                      c/d

j/b   k                 m                  k

                                           h

 h    g          c/d                       g



                  Register Allocation 58
Coalescing
example

             f



             e                        j/b

                                      c/d

j/b   k                 m                  k

                                           h

 h    g          c/d                       g



                  Register Allocation 59
Coalescing
example

             f



             e

                                      c/d

j/b   k                 m                  k

                                           h

 h    g          c/d                       g



                  Register Allocation 60
Coalescing
example

             f



             e




j/b   k                 m                  k

                                           h

 h    g          c/d                       g



                  Register Allocation 61
Coalescing
example

             f



             e




j/b   k                 m

                                           h

 h    g          c/d                       g



                  Register Allocation 62
Coalescing
example

             f



             e




j/b   k                 m




 h    g          c/d                       g



                  Register Allocation 63
Coalescing
coalescing nodes

                   f



                   e




j/b    k                      m




 h     g               c/d



                        Register Allocation 64
IV
pre-coloured nodes




                     Register Allocation 65
Recap: Calling Conventions
CDECL

caller                                                push   21
                                                      push   42
   •     push parameters right-to-left on the stack   call
                                                      add
                                                             _f
                                                             ESP 8
   •     clean-up stack after call

callee

   •     save old BP                                  push   EBP

   •     initialise new BP                            mov
                                                      mov
                                                             EBP
                                                             EAX
                                                                   ESP
                                                                   [EBP + 8]
   •     save registers                               mov    EDX   [EBP + 12]

   •     return result in AX
                                                      add
                                                      pop
                                                             EAX
                                                             EBP
                                                                   EDX


   •     restore registers                            ret

   •     restore BP

                                                             Register Allocation 66
Recap: Calling Conventions
STDCALL

caller                                                push 21
                                                      push 42
   •     push parameters right-to-left on the stack   call _f@8


callee

   •     save old BP
   •     initialise new BP                            push   EBP

   •     save registers                               mov
                                                      mov
                                                             EBP
                                                             EAX
                                                                   ESP
                                                                   [EBP + 8]
   •     return result in AX                          mov    EDX   [EBP + 12]

   •     restore registers
                                                      add
                                                      pop
                                                             EAX
                                                             EBP
                                                                   EDX


   •     restore BP                                   ret    8




                                                             Register Allocation 67
Recap: Calling Conventions
FASTCALL

caller                                                  mov ECX 21
                                                        mov EDX 42
   •     passes parameters in registers                 call @f@8

   •     pushes additional parameters right-to-left on the stack
   •     cleans up the stack

callee
                                                        push   EBP

   •     save old BP, initialise new BP                 mov
                                                        mov
                                                               EBP ESP
                                                               EAX ECX
   •     save registers                                 add    EAX EDX

   •     return result in AX
                                                        pop
                                                        ret
                                                               EBP


   •     restore registers
   •     restore BP

                                                               Register Allocation 68
Pre-coloured nodes
representing registers

nodes

  •     register = pre-coloured node

  •     no simplify, no spill

  •     coalesce possible

edges

  •     all registers interfere with each other

  •     explicit usage of registers

  •     call and return instructions influence liveness



                                                          Register Allocation 69
V
summary




          Register Allocation 70
Summary
lessons learned

How can we assign registers to local variables and temporaries?

  •   perform liveness analysis
  •   build interference graph
  •   colour interference graph

What to do if the graph is not colourable?

  •   keep local variables in memory

How to handle move instructions efficiently?

  •   coalesce nodes safely



                                                  Register Allocation 71
Literature
learn more

Andrew W. Appel, Jens Palsberg: Modern Compiler
Implementation in Java, 2nd edition. 2002


Lal George, Andrew W. Appel: Iterative Register Coalescing.
POPL 1996


Lal George, Andrew W. Appel: Iterative Register Coalescing.
TOPLAS 18(3), 1996




                                                  Register Allocation 72
Outlook
coming next

imperative and object-oriented languages

  •   Lecture 11: Register Allocation today
  •   Lecture 12: Garbage Collection Nov 13

compiler components & their generators

  •   Lecture 13: Scanning Nov 20
  •   Lecture 14: LL Parsing Dec 04
  •   Lecture 15: LR Parsing Dec 11

exam preparation

  •   Question & Answer Jan 08


                                              Register Allocation 73
copyrights




             Register Allocation 74
Register Allocation 75
Pictures
attribution & copyrights

Slide 1:
   Colors #2 by Carmelo Speltino, some rights reserved

Slide 40:
   Tchibo by Dominica Williamson, some rights reserved

Slide 76:
   Romantic Pigeon Date by Harald Hoyer, some rights reserved




                                                                Register Allocation 76

More Related Content

KEY
Compiling Imperative and Object-Oriented Languages - Dataflow Analysis
PDF
A Novel Solution Of Linear Congruences
PDF
A Walk in the GAN Zoo
PDF
Logistic Regression(SGD)
PDF
Advanced Topics Sorting
PDF
Scalable Link Discovery for Modern Data-Driven Applications
PDF
Multilayer Neural Networks
PDF
Gate Computer Science Solved Paper 2007
Compiling Imperative and Object-Oriented Languages - Dataflow Analysis
A Novel Solution Of Linear Congruences
A Walk in the GAN Zoo
Logistic Regression(SGD)
Advanced Topics Sorting
Scalable Link Discovery for Modern Data-Driven Applications
Multilayer Neural Networks
Gate Computer Science Solved Paper 2007

What's hot (17)

PDF
Query Rewriting and Optimization for Ontological Databases
PDF
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
PPTX
Story of static code analyzer development
PDF
bayesImageS: Bayesian computation for medical Image Segmentation using a hidd...
PDF
Ef24836841
PDF
R package 'bayesImageS': a case study in Bayesian computation using Rcpp and ...
PDF
Kernel for Chordal Vertex Deletion
PDF
Querying Temporal Databases via OWL 2 QL
PDF
Module 13 Gradient And Area Under A Graph
PDF
Bayesian Inference and Uncertainty Quantification for Inverse Problems
PDF
icml2004 tutorial on spectral clustering part I
PDF
icml2004 tutorial on spectral clustering part II
PDF
By32474479
PDF
Deep Convolutional GANs - meaning of latent space
PDF
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
PPTX
Cepstral coefficients
PDF
Polynomial Kernel for Interval Vertex Deletion
Query Rewriting and Optimization for Ontological Databases
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
Story of static code analyzer development
bayesImageS: Bayesian computation for medical Image Segmentation using a hidd...
Ef24836841
R package 'bayesImageS': a case study in Bayesian computation using Rcpp and ...
Kernel for Chordal Vertex Deletion
Querying Temporal Databases via OWL 2 QL
Module 13 Gradient And Area Under A Graph
Bayesian Inference and Uncertainty Quantification for Inverse Problems
icml2004 tutorial on spectral clustering part I
icml2004 tutorial on spectral clustering part II
By32474479
Deep Convolutional GANs - meaning of latent space
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
Cepstral coefficients
Polynomial Kernel for Interval Vertex Deletion
Ad

Viewers also liked (20)

PDF
Specialist officer it study material on organization of intel 8085 microproce...
PDF
Cpu Cache and Memory Ordering——并发程序设计入门
PDF
Shift registers
PPTX
Register organization, stack
PPTX
Register Organization and Instruction cycle
PDF
Lecture 2
PPTX
Processor organization &amp; register organization
PPTX
Central processing unit
PPTX
Register transfer and micro-operation
PPTX
bus and memory tranfer (computer organaization)
PPTX
Register transfer and micro operation
PPT
History of CPU Architecture
PPTX
Register transfer language
PDF
Chapter 6 register
PPT
Chapter 4 Microprocessor CPU
PPT
Cpu ppt cse
PPSX
08. Central Processing Unit (CPU)
PPTX
Cpu presentation
PPT
Introduction to computer hardware
Specialist officer it study material on organization of intel 8085 microproce...
Cpu Cache and Memory Ordering——并发程序设计入门
Shift registers
Register organization, stack
Register Organization and Instruction cycle
Lecture 2
Processor organization &amp; register organization
Central processing unit
Register transfer and micro-operation
bus and memory tranfer (computer organaization)
Register transfer and micro operation
History of CPU Architecture
Register transfer language
Chapter 6 register
Chapter 4 Microprocessor CPU
Cpu ppt cse
08. Central Processing Unit (CPU)
Cpu presentation
Introduction to computer hardware
Ad

More from Guido Wachsmuth (16)

PDF
Language
PDF
Domain-Specific Type Systems
KEY
Declarative Syntax Definition - Pretty Printing
PDF
Compiler Components and their Generators - LR Parsing
KEY
Compiling Imperative and Object-Oriented Languages - Garbage Collection
KEY
Compiler Components and their Generators - Lexical Analysis
PDF
Compiler Components and their Generators - Traditional Parsing Algorithms
PDF
Pure and Declarative Syntax Definition: Paradise Lost and Regained
PDF
Introduction - Imperative and Object-Oriented Languages
KEY
Compiling Imperative and Object-Oriented Languages - Activation Records
PDF
Declarative Semantics Definition - Code Generation
PDF
Declarative Semantics Definition - Static Analysis and Error Checking
PDF
Declarative Semantics Definition - Term Rewriting
PDF
Syntax Definition
PDF
Declarative Syntax Definition - Grammars and Trees
PDF
Software Languages
Language
Domain-Specific Type Systems
Declarative Syntax Definition - Pretty Printing
Compiler Components and their Generators - LR Parsing
Compiling Imperative and Object-Oriented Languages - Garbage Collection
Compiler Components and their Generators - Lexical Analysis
Compiler Components and their Generators - Traditional Parsing Algorithms
Pure and Declarative Syntax Definition: Paradise Lost and Regained
Introduction - Imperative and Object-Oriented Languages
Compiling Imperative and Object-Oriented Languages - Activation Records
Declarative Semantics Definition - Code Generation
Declarative Semantics Definition - Static Analysis and Error Checking
Declarative Semantics Definition - Term Rewriting
Syntax Definition
Declarative Syntax Definition - Grammars and Trees
Software Languages

Recently uploaded (20)

PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
01-Introduction-to-Information-Management.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
master seminar digital applications in india
PPTX
Institutional Correction lecture only . . .
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
Basic Mud Logging Guide for educational purpose
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
01-Introduction-to-Information-Management.pdf
Anesthesia in Laparoscopic Surgery in India
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Pre independence Education in Inndia.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Supply Chain Operations Speaking Notes -ICLT Program
master seminar digital applications in india
Institutional Correction lecture only . . .
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Computing-Curriculum for Schools in Ghana
Basic Mud Logging Guide for educational purpose
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Microbial diseases, their pathogenesis and prophylaxis
2.FourierTransform-ShortQuestionswithAnswers.pdf
Insiders guide to clinical Medicine.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx

Compiling Imperative and Object-Oriented Languages - Register Allocation

Editor's Notes