Keith Cooper, Jason Eckhardt, and Ken Kennedy (2008)
Redundancy Elimination Revisited
Proceedings of the 17th International Conference on Parallel Architectures and Compilation Techniques:12-21.
This work proposes and evaluates improvements to previously known algorithms for redundancy elimination. Enhanced Scalar Replacement combines two classic techniques, scalar replacement and hash-based value numbering.
The former detects redundant array references within and across loop iterations, while the latter detects a large class of redundancies, but only within a single loop iteration. By integrating the two techniques, ESR detects and eliminates a wider range of expression redundancies across loop iterations.
We also extend hash-based value numbering to perform reassociation.
Classic redundancy elimination techniques operate on an intermediate representation of the program in which operand association and order is of fixed shape. This rigidity in code shape may sometimes obscure redundancies.
Our optimizer attempts to shape the code by changing associativity, exposing more redundancies. Opportunities for ESR, in particular, are increased with reassociation.