JUCS - Journal of Universal Computer Science 9(8): 829-850, doi: 10.3217/jucs-009-08-0829
Constant Propagation on Predicated Code
expand article infoJens Knoop, Oliver Rüthing§
‡ Vienna University of Technology, Vienna, Austria§ University of Dortmund, Germany
Open Access
We present a new constant propagation (CP) algorithm for predicated code, for which classical CP-techniques are inadequate. The new algorithm works for arbitrary control flow, detects constancy of terms, whose operands are not constant themselves, and is optimal for acyclic code such as hyperblocks, the central "compilation units" for instruction scheduling of predicated code. The new algorithm operates on the predicated value graph, an extension of the well-known value graph of Alpern et al. [Alpern et al., 1988], which is tailored for predicated code and constructed on top of the predicate-sensitive SSA-form, which has been introduced by Carter et al. [Carter et al., 1999]. As an additional benefit, the new algorithm identifies off-predicated instructions in predicated code. They can simply be eliminated thereby further increasing the performance and simplifying later compilation phases such as instruction scheduling.
constant propagation, predicated code, IA-4, predicated SSA-form, predicated value graph, data-flow analysis, optimization