|
ABSTRACT
We discuss the problem of generating code for a wide class of machines, restricting ourselves to the computation of expression trees. After defining a broad class of machines and discussing the properties of optimal programs on these machines, we derive a necessary and sufficient condition which can be used to prove the optimality of any code generation algorithm for expression trees on this class. We then present a dynamic programming algorithm which produces optimal code for any machine in the class; this algorithm runs in time which is linearly proportional to the number of vertices in an expression tree.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
Aho, A. V., and Ullman, J. D., "Optimization of Straight Line Code," SIAM J. Computing1:1 (1972), 1-19.
|
 |
3
|
|
 |
4
|
|
| |
5
|
Bruno, J., and Sethi, R., "Register Allocation for a One-Register Machine," Technical Report No. 157, Computer Science Dept., Pennsylvania State University, October 3, 1974.
|
 |
6
|
|
| |
7
|
Karp, R. M., "Reducibility among Combinatorial Problems," in Complexity of Computer Computations, R. E. Miller and J. W. Thatcher (eds.), Plenum Press, New York (1972), 85-103.
|
| |
8
|
Knuth, D. E., Fundamental Algorithms, second edition, The Art of Computer Programming 1, Addison-Wesley, Reading, Mass., 1973.
|
 |
9
|
|
 |
10
|
|
| |
11
|
Sethi, R., "Complete Register Allocation Problems," Technical Report No. 134, Computer Science Dept., Pennsylvania State University, May, 1974.
|
 |
12
|
|
| |
13
|
|
 |
14
|
|
|