Machine-translated by Google. Questions are authored in English.
Top

Discussion

Data flow analysis is used to

  • A.gather facts about values that hold at each point in the program
  • B.verify that the grammar of the language is unambiguous
  • C.check that every single identifier has been properly declared before use
  • D.translate the syntax tree into three address code

Answer: A

Correct answer: gather facts about values that hold at each point in the program

Data flow analysis propagates information around the flow graph until it stabilises, answering questions such as which definitions reach a point, which variables are live, and which expressions are available.

Those facts are what make optimisation safe: common subexpression elimination needs to know the operands are unchanged, dead code elimination needs to know a value is never used. The analysis produces no code itself; it establishes the conditions under which a transformation is permitted.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.