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 := yHumans 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:
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:
“It is too late in the century for women who have received the benefits of co-education in schools and colleges, and who bear their full share in the worlds work, not to care who make the laws, who expound and who administer them.”
—J. Ellen Foster (18401910)
“One of your biggest jobs as a parent of multiples is no bigger than simply talking to your children individually and requiring that they respond to you individually as well. The benefits of this kind of communication can be enormous, in terms of the relationship you develop with each child, in terms of their language development, and eventually in terms of their sense of individuality, too.”
—Pamela Patrick Novotny (20th century)
“In America the young are always ready to give to those who are older than themselves the full benefits of their inexperience.”
—Oscar Wilde (18541900)