D. Final Phase of Compilation: A. First Phase of Compilation B. Second Phase of Compilation C. Third Phase of Compilation
D. Final Phase of Compilation: A. First Phase of Compilation B. Second Phase of Compilation C. Third Phase of Compilation
2. ___________ is a tool that depicts the structure of basic blocks, helps to see the flow
of values flowing among the basic blocks, and offers optimization too.
A. DAG
B. CAG
C. SAG
D. PAG
void add_ten(int x)
return x + 10;
7. How many descriptors are used for track both the registers (for availability) and
addresses (location of values) while generating the code?
A. 2
B. 3
C. 4
D. 5
8. __________ are used to keep track of memory locations where the values of
identifiers are stored.
A. Register descriptor
B. Address descriptor
C. Both A and B
D. None of the above
9. Code generator uses ______ function to determine the status of available registers
and the location of name values.
A. setReg
B. cinReg
C. pfReg
D. getReg
12. A fragment of code that resides in the loop and computes the same value at each
iteration is called a?
A. Induction analysis
B. Strength reduction
C. loop-invariant code
D. None of the above
13. A variable is called an _________ variable if its value is altered within the loop by a
loop-invariant value.
A. Invariant
B. induction
C. strength
D. loop
14. Dead code plays no role in any program operation and therefore it can simply be
eliminated.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
15. Substitution of values for names whose values are constant, is done in
A. local optimization
B. loop optimization
C. constant folding
D. None of the above
17. In analyzing the compilation of PL/I program, the term Machine independent
optimization is assosiated with
A. creation of more optical matrix
B. recognition of basic elements and creation of uniform symbols
C. recognization of basic syntactic construction through reductionsc
D. use of macro-processor to produce more optimal assembly code
18. Before generating intermediate code, the compiler can modify the intermediate
code by address calculations and improving loops.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
19. The compiler can make use of memory hierarchy and CPU registers.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
20. A compiler for a high-level language that runs on one machine and produces
code for a different machine is called
A. optimizing compiler
B. one pass compiler
C. cross compiler
D. multipass compiler