retagged by
997 views
0 votes
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?
retagged by

1 Answer

Related questions

3 votes
3 votes
0 answers
1
2 votes
2 votes
0 answers
2
0 votes
0 votes
0 answers
3
charul asked Dec 6, 2017
594 views
I'm getting 4 nodes and 5 edges. But the answer given is : 6 nodes and 7 edges
2 votes
2 votes
1 answer
4
Sambhrant Maurya asked Nov 1, 2018
4,412 views
The minimum number of variables required in 3 address code of the given expression are:______a * b * c + d - a + e * f - g + hOrder of precedence: * + - ; with * as lef...