251 views

1 Answer

4 votes
4 votes

$d_{1} = a_{1} + b_{1}$

$e_{1} = a_{1} - b_{1}$

$f_{1} = c_{1} + d_{1}$

$g_{1} = c_{1} - e_{1}$

$a_{2} = f_{1} + g_{1}$

$b_{2} = f_{1} - g_{1}$

$c_{2} = d_{1} + e_{1}$

 

So, variables used : $a_{1}, a_{2}, b_{1}, b_{2}, c_{1}, c_{2}, d_{1}, e_{1}, f_{1}, g_{1}$

Total 10 variables are required to convert given code into static single assignment form.

edited by

Related questions

1.3k
views
0 answers
3 votes
shreyansh jain asked Dec 26, 2018
1,281 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 ... is it always the case, if NO when do we have to do it. Please clarify.
864
views
1 answers
1 votes
jatin khachane 1 asked Nov 23, 2018
864 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 ... Y1 - X1X2 = D + Y2Z1 = F + Y2Z2 = Z1 + AIs above code in SSA ??
1.9k
views
0 answers
1 votes
Heena Jain asked Nov 14, 2018
1,867 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 because both of them evaluate the same expression finally?
416
views
0 answers
2 votes