O'Reilly logo

Modern Compiler Implementation in Java, Second Edition by Jens Palsberg, Andrew W. Appel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17Dataflow Analysis

anal-y-sis: an examination of a complex, its elements, and their relations

Webster’s Dictionary

An optimizing compiler transforms programs to improve their efficiency without changing their output. There are many transformations that improve efficiency:

Register allocation: Keep two nonoverlapping temporaries in the same register.

Common-subexpression elimination: If an expression is computed more than once, eliminate one of the computations.

Dead-code elimination: Delete a computation whose result will never be used. Constant folding: If the operands of an expression are constants, do the computation at compile time.

 

This is not a complete list of optimizations. In fact, there can never be a complete list.

NO MAGIC BULLET ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required