Summary
This paper presents a systematic development of the analysis of code generation for the single register machine, from linear to exponential time algorithms. A class of expressions with common subexpressions is introduced which can be optimally coded in quadratic time. A heuristic based on this development is shown to produce code size better than 5/4 that of an optimal coding, for any expression. A method is proposed which would improve this bound, but the most straightforward implementation is shown to require exponential time. Finally, a new analysis of the exponential time bound is presented which more closely describes the complexity of the task of producing optimal code.
Similar content being viewed by others
References
Aho, A.V., Johnson, S.C.: Optimal Code Generation for Expression Trees. J. ACM 23, 3 (1976)
Aho, A.V., Johnson, S.C., Ullman, J.D.: Code Generation for Expressions with Common Sub-expressions. J. ACM 24, 1 (1977)
Bruno, J.L., Sethi, R.: Code Generation for a One-Register Machine. J. ACM 23, 3 (1976)
Carter, L.R.: An Analysis of Pascal Programs. UMI Research Press, Ann Arbor, Michigan, 1982
Gabow, H.: Private communication.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Carter, L.R. Further analysis of code generation for a single register machine. Acta Informatica 18, 135–147 (1982). https://doi.org/10.1007/BF00264435
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00264435