The Gateway to Computer Science Excellence
0 votes
126 views
# of temporary variable required to create 3 address code in static single assignment form for the expression P+Q*R-S/(Q*R).
in Compiler Design by Boss (17.1k points) | 126 views
0
2?
0
given is 4 but i think it5

1 Answer

+1 vote

Is it 4 ? 

by (25 points)
0
here q*r is used 2 times rt so why u used same variable ?
0
I think it's because in static single assignment you cannot reassign something twice , but you can reuse it again if needed in RHS like t1 . Here you are not reassigning t1 again,  but using it again . Thanks.
0
yes true
0

@ In general Static Single Assignment means for each and every variable and for every computation of the program,we should assign a temporary variable right?

So then total temporary variables should be 8 right?

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,312 answers
198,343 comments
105,038 users