GATE Computer ScienceModerateGATE CS (PYQ pattern)

Which of the following about intermediate representations is/are true? I. In triples, an operand that is a result of another statement is referred to by that statement's position, so moving a statement needs renumbering. II. Indirect triples allow an optimiser to reorder statements by changing only the list of pointers. III. Quadruples name every result explicitly, so statements can be moved without changing the others. IV. A DAG of a basic block cannot show common sub-expressions.

  1. A. I, II and III only
  2. B. I and II only
  3. C. II, III and IV only
  4. D. I, III and IV only

Correct answer: A. I, II and III only

I-III are the standard properties; IV is false, since detecting common sub-expressions is the main use of the DAG.

More Compiler Design questions

Exams that ask this topic