A Supplement to “PRE: A Simple, Pragmatic, and Provably Correct Algorithm”

A partial redundancy elimination (PRE) is a compiler optimization that eliminates expressions that are redundant on some but not necessarily all paths through a program. A PRE algorithm called “PRE: a simple, pragmatic, and provably correct algorithm,” presented by Vineeth Kumar Paleri does not give importance for eliminating edge splitting, even though the edge splitting is more expensive than inserting a computation at an existing node of a data flow graph (DFG). The insert equation of the PRE algorithm does not insert a computation for an expression in an existing node of a DFG if the node does not compute the expression concerned. This leads to unnecessary edge splitting. In this paper, the insert equation of the PRE algorithm is updated to avoid the edge splitting as far as possible, and hence the algorithm becomes more compact and beautiful.