359 views

1 Answer

Best answer
6 votes
6 votes

In simple terms , SSA means single state assignment and is useful for the purpose of compiler optimisations .

In simple words , in SSA , we assign to a particular variable only once . Once a variable is assigned , it is not reassigned later .

As an example  : 

p   =   q + r

q   =   r + s

s   =   t + u

p   =  s  + v

r    =  p + t

Now we can see 'p' is assigned twice here and rest are assigned once . So to make it into SSA form , we need to re write the last two productions accordingly because 'r' is assigned after 'p' is reassigned so 'r' is dependent on 'p' which is re assigned.

Hence the last two lines of the code will be re written as : 

x  =  s + v

r   =  x + t

selected by

No related questions found