Optimal Code Motion: Theory & Practice


An implementationoriented algorithmfor lazy code motion is presentedthat minimizesthe number of computations in programs while suppressing any unnecessary code motion in order to avoid superruous register pressure. In particular, this variant of the original algorithm for lazy code motion works on owgraphs whose nodes are basic blocks rather than single statements, as this format is standard in optimizing compilers. The theoretical foundations of the modiied algorithm are given in the rst part, where t-reened owgraphs are introduced for simplifying the treatment of owgraphs whose nodes are basic blocks. The second part presents thèbasic block' algorithm in standard notation, and gives directions for its implementation in standard compiler environments.

2 Figures and Tables

Cite this paper

@inproceedings{Knoop1994OptimalCM, title={Optimal Code Motion: Theory & Practice}, author={Jens Knoop and Oliver R}, year={1994} }