Wegman and Zadeck's Sparse Conditional Constant (SCC) algorithm was used to find constant expressions, constant conditions, and unreachable code [WZ91]. Figure 3 shows the optimization extent possible.
The output of the SCC algorithm is an association of variables to one
of , where
marks a variable that is never defined,
c indicates a constant value, and
signifies an over-defined variable (which may be assigned any one of
a number of values).
In addition, every flow-graph node (corresponding
to a quadruple) is marked as executable or non-executable. We then
walk the flow-graph, eliminating dead-code (quadruples marked
non-executable), replacing constant variables with their values, and
changing constant conditional branches to goto statements.