Static Single Assignment Form - Benefits

Benefits

The primary usefulness of SSA comes from how it simultaneously simplifies and improves the results of a variety of compiler optimizations, by simplifying the properties of variables. For example, consider this piece of code:

y := 1 y := 2 x := y

Humans can see that the first assignment is not necessary, and that the value of y being used in the third line comes from the second assignment of y. A program would have to perform reaching definition analysis to determine this. But if the program is in SSA form, both of these are immediate:

y1 := 1 y2 := 2 x1 := y2

Compiler optimization algorithms which are either enabled or strongly enhanced by the use of SSA include:

  • constant propagation
  • value range propagation
  • sparse conditional constant propagation
  • dead code elimination
  • global value numbering
  • partial redundancy elimination
  • strength reduction
  • register allocation

Read more about this topic:  Static Single Assignment Form

Famous quotes containing the word benefits:

    I do seriously believe that if we can measure among the States the benefits resulting from the preservation of the Union, the rebellious States have the larger share. It destroyed an institution that was their destruction. It opened the way for a commercial life that, if they will only embrace it and face the light, means to them a development that shall rival the best attainments of the greatest of our States.
    Benjamin Harrison (1833–1901)

    When your parents are in political life, you aren’t normal. Everybody talks about the benefits, but I don’t know what the benefits are.... But I’d rather have that kind of mother than an overweight housewife.
    Katherine Berman Mariano (b. 1957)

    In America the young are always ready to give to those who are older than themselves the full benefits of their inexperience.
    Oscar Wilde (1854–1900)