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

Discussion

Assertion (A): Pointer assignments make optimisation of intermediate code harder.
Reason (R): The compiler cannot always determine which variables a pointer might refer to.

  • A.Both A and R are true, and R is the correct explanation of A
  • B.Both A and R are true, but R is not the correct explanation of A
  • C.A is true but R is false
  • D.A is false but R is true

Answer: A

Both are true and the reason gives the mechanism, and the difficulty has a name. Alias analysis attempts to bound the set of possible targets, and where it cannot, the optimiser must assume the worst and forgo the transformation.

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

Post your comment

Please log in or register to post a comment.