Sei sulla pagina 1di 2

August-18/B.E.

/EndSEM
B.E.(Information Technology) (SEM I)
Elective –II 414457 D
Compiler Construction (2015 Course)
------------------------------------------------------------------------------------------------
Instructions to candidates:
1) Figures to the right indicate full marks.
2) Assume suitable data if necessary.

Q.1 a) Obtain output of first three phases of compiler for following input string. [04]
p=e*10+c
b) Explain the algorithm of Mark-and-Sweep garbage collection. Derive the cost [08]
of garbage collection for it.
OR
Q.2 a) For the statement given below generate the intermediate code in the form of a [04]
quadruple, triple and indirect triple.
A=-P*(-Q+R)
b) Explain copying collection with a neat diagram. Write the algorithm for [08]
pointer forwarding.

Q.3. a) Give applications of regular expression. [02]


b) Define inline expansion. Explain the rules for inline expansion. [06]
OR
Q.4. a) Enlist the operations performed on Symbol Table [02]
b)Explain call-by-name and call-by-need with respect to lazy evaluation. [06]

Q.5 a) What are the different techniques used to speed-up dataflow analysis? [08]
b) What are reasons for variable aliases?Explain variable aliases based on type and [08]
based on flow.
OR
Q. 6.a) Expalin Explicit and Implicit parametric polymorphism with suitable examples [08]
in detail
b) Explain how type-checking for polymorphic language is done. [08]
Q.7 a) Compare Static Single Assignment with Classical Data-Flow analysis . [08]
b) Discuss following optimization with example. [08]
i) Dead-code Elimination and
ii) Code motion
OR
Q. 8.a) Explain how loop optimization is done w.r. t. Induction variable elimination. [08]
b) Write a algorithm to calculate dominators of flow graph. [08]

Q.9 a) Explain Iterative Modulo scheduling algorithm with an example. [08]


b) Write a note on Static Branch Prediction? [08]
“Should the compiler predicts branches?” Justify your answer.
c) What is the use of prefetch instruction. [02]
OR
Q.10 a) Explain advantages of Static Scheduling and Dyanamic scheduling. [06]
b) Explain dyanamic mapped cashe organization with example. [06]
c) Expalin the following terms w. r. t. Cashe organization. [06]
i) Write-hit policy
ii) Write-miss policy
iii) Fetch-on-write
iv) Write-validate
v) Write-around
vi) Spatial-locality

-----------------------------------------------------------------------------------------------

Potrebbero piacerti anche