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:

    “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)

    “It is with benefits as with injuries in this respect, that we do not so much weigh the accidental good or evil they do us, as that which they were designed to do us.—That is, we consider no part of them so much as their intention.”
    —Laurence Sterne (1713–1768)

    “Unfortunately, we cannot rely solely on employers seeing that it is in their self-interest to change the workplace. Since the benefits of family-friendly policies are long-term, they may not be immediately visible or quantifiable; companies tend to look for success in the bottom line. On a deeper level, we are asking those in power to change the rules by which they themselves succeeded and with which they identify.”
    —Anne C. Weisberg (20th century)