Dead-Store Elimination

Dead-store elimination is an extension of common subexpression elimination. Variables that contain the same value in a short piece of code can be combined into a single temporary variable.

In the following code fragment, the compiler detects that the expression func( x ) is equivalent to func( a + b ):

x = a + b;

x = func( x );

Thus, the compiler can rewrite the code as follows:

x = func( a + b );