• closed by
496 views

1 Answer

0 0 votes

Static Single Assignment  is a means of structuring the Intermediate representation such that every variable is allotted a value only once and every variable is defined before it’s use. 

So the Static Single Assignment for above code is 

d = a+b

e = a-b

f = c+d

g = c-e

a = f+g

b = f-g

c = d+e

So total variables used are  7 

Short Trick : If any variable is repeating again in the LHS then assign a new variable for it. 

                   e.g : a = b+c

                           a = d-c

                           So the Static Single Assignment for above code is 

                           a = b+c

                           a1 = d-c

Position:
Show:

Related questions

3 3 votes
0 0 answers
2.1k
2.1k views
shreyansh jain asked Dec 26, 2018
2,068 views
Consider the following code segment:$c=b+a$$e=c-a$$f=c*e$$h=c+a$$i=h+f$The minimum number of temporary variable required to convert the above code segment to static singl...
1 1 vote
1 1 answer
1.9k
1.9k views
jatin khachane 1 asked Nov 23, 2018
1,863 views
X = A / bY = C + DY = Y - XX = D + YZ = F + YZ = Z + AMInimum number of total variables needed to convert above TAC to Static Single AssignmentAnswer given ==>11My appora...
1 1 vote
0 0 answers
3.7k
3.7k views
Heena Jain asked Nov 14, 2018
3,669 views
What is the Static Single Assignment (SSA) form for the following code segment:a = b+c;c = a+x;d = b+c;d = a+x;Should we use only 1 temporary variable for c=a+x and d=a+x...
2 2 votes
0 0 answers
702
702 views