in Compiler Design edited by
1,209 views
1 vote
1 vote

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 single assignment form is ________.

in Compiler Design edited by
1.2k views

4 Comments

same in question 2nd equation is simply store b , which can be seen via DAG , and we can save 1 temp register.
1
1

Anu007  Agree with 4 temporary variables for this segment.
But
If question asks :  The minimum number of temporary variable required to convert the above "part of program" to static single assignment form is :
Answer would be same "4" or "5"?

0
0
It's already in SSA form. So 0 temporary variables required.
0
0

Please log in or register to answer this question.

Related questions