Redirected
retagged by
1,740 views
1 votes
1 votes

The optimization phase in a compiler generally

  1. Reduces the space of the code
  2. Optimizes the code to reduce execution time
  3. Both (A) and (B)
  4. Neither (A) nor (B)
retagged by

1 Answer

4 votes
4 votes

Code Optimizer of Compiler actually reduces the code of a program.

Ex:   x = 27 * 5 is transformed to x = 135

And Optimization phase also optimizes the code to reduce execution time.

Say, After Intermediate Code Generation phase if the program will looks like 

x = b*c

y = x*v

z=y

then,Code Optimizer will take this code & transformed it into this:

x = b*c

z = x*v

So, option A) & B) both are Right.

Option (C) Both (A) and (B) is Correct.

Answer:

Related questions

2 votes
2 votes
4 answers
1
admin asked Mar 30, 2020
8,803 views
Which of the following is machine independent optimization?Loop optimizationRedundancy EliminationFoldingAll of the option
0 votes
0 votes
1 answer
2
admin asked Mar 30, 2020
1,220 views
The grammar $S\rightarrow aSb\mid bSa\mid SS\mid \varepsilon $ is:Unambiguous CFGAmbiguous CFGNot a CFGDeterministic CFG
2 votes
2 votes
1 answer
3
admin asked Mar 30, 2020
2,792 views
Which of the following statements is/are false?$S1$: $LR(0)$ grammar and $SLR(1)$ grammar are equivalent$S2$: $LR(1)$ grammar are subset of $LALR(1)$ grammars$S1$ only$S1...