edited by
7,400 views
10 votes
10 votes
Consider the following code segment

$a=b-c$

$d=a+d$

$a=d+e$

$d=c*f$

$d=a*d$

The minimum number of total variables required to convert the above code segment to static single assignment form is _________.

 
Answer given is 10. Should it be 9????
edited by

1 Answer

Best answer
21 votes
21 votes

In compiler design, static single assignment form (often abbreviated as SSA form or simply SSA) is a property of an intermediate representation (IR), which requires that each variable is assigned exactly once, and every variable is defined before it is used.

t1=b-c

t2=t1+d

t3=t2+e

t4=c*f

t5=t3*t4

temporary variable = t1,t2,t3,t4,t5

variable=b,c,d,e,f

total variable = 10

selected by
Answer:

Related questions

1 votes
1 votes
2 answers
1
A_i_$_h asked Sep 7, 2017
597 views
Consider the following code segmenta= b - cd = a + da = d + ed = c * fd = a * dthe min number of total variables required to convert the above code segment to static sing...
1 votes
1 votes
1 answer
2
atul_21 asked Jul 8, 2017
513 views
The sum of least number of temporary variables and total variables required to create a three address code in single static assignment form for the expressiona*b + c/d + ...
2 votes
2 votes
1 answer
3
0 votes
0 votes
1 answer
4
minal asked Jan 22, 2019
937 views
# of temporary variable required to create 3 address code in static single assignment form for the expression P+Q*R-S/(Q*R).