Compilers: principles, techniques, and tools
Compilers: principles, techniques, and tools
Optimal Code Generation for Expression Trees
Journal of the ACM (JACM)
Code Generation for Expressions with Common Subexpressions
Journal of the ACM (JACM)
Principles of Program Analysis
Principles of Program Analysis
The complexity of the equivalence problem for straight-line programs
STOC '80 Proceedings of the twelfth annual ACM symposium on Theory of computing
A formal approach to code optimization
Proceedings of a symposium on Compiler optimization
Hi-index | 0.00 |
We study the effect of an optimizing algorithm for straight-line code which first constructs a directed acyclic graph representing the given program and then generates code from it. We show that this algorithm produces optimal code with respect to the classical transformations known as Constant Folding, Common Subexpression Elimination, and Dead Code Elimination. In contrast to the former, the latter are also applicable to iterative code containing loops. We can show that the graph-based algorithm essentially corresponds to a combination of the three classical optimizations in conjunction with Copy Propagation. Thus, apart from its theoretical importance, this result is relevant for practical compiler design as it potentially allows to exploit the optimization potential of the graph-based algorithm for non-linear code as well.