10.5 Global Data-flow Analysis

The local code optimization methods discussed till now, though quite effective, do have their limitations. The limitations arise mainly due to:

  • incomplete information about the liveness of variables at the end of a Basic Block;
  • impossibility of optimization across more than one Basic Block.

More advanced optimization techniques, known as Global optimization, mostly done via global data-flow analysis, make available more accurate information about the variables at start and end of each Basic Block. They allow for better optimization by:

  • Having more accurate information, the methods discussed above, with certain assumption about liveness of variables, can be applied more effectively.
  • The methods can be extended ...

Get Compilers: Principles and Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.