• retagged by
1,851 views
0 0 votes

 

Given the 3-address code for a basic block:

 

The number of registers that are needed to allocate this basic block with no spills are ________.?

My doubt here is :

  1. Is there any difference in question asking for minimum numbers of registers and minimum number of variables required for 3 address code?
  2. Can’t we optimize the above code using code motion?
  3. If the question ask only for number of variables required in three address code ! do we need to optimize before counting?
  4. If the question ask for minimum number of variables required in three address code, Only then should we optimize the code before counting?

1 Answer

Position:
Show:

Related questions

2 2 votes
0 0 answers
1.2k
1.2k views
ashish pal asked Jan 8, 2018
1,218 views
I got answer 8 nodes and 10 edges.but answer is 6 nodes and 6 edgesanyone plz explain.
0 0 votes
0 0 answers
627
627 views
Prince Sindhiya asked Jul 24, 2018
627 views
$\text{Generate the 3 address code for}$i=1; while(i<10) { x=0; i=i+1; }And find the least no. Of temporary variable required to create a 3 address code in static single ...
1 1 vote
1 1 answer
992
992 views
Ankita87077 asked Oct 27, 2021
992 views
In such questions, In which it is asked " minimum number of registers required for executing this three address code without spilling", can we apply code motion optimizat...