The Generation of Optimal Code for Arithmetic Expressions
Journal of the ACM (JACM)
The Generation of Optimal Code for Stack Machines
Journal of the ACM (JACM)
Optimal Code Generation for Expression Trees
Journal of the ACM (JACM)
On compiling algorithms for arithmetic expressions
Communications of the ACM
On programming of arithmetic operations
Communications of the ACM
Code-generation for machines with multiregister operations
POPL '77 Proceedings of the 4th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Efficient Computation of Expressions with Common Subexpressions
Journal of the ACM (JACM)
Instruction Sets for Evaluating Arithmetic Expressions
Journal of the ACM (JACM)
Efficient computation of expressions with common subexpressions
POPL '78 Proceedings of the 5th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Hi-index | 0.00 |
Suppose you are approached by a computer designer who wants to select a machine architecture and instruction set that is desirable from a compiler writers standpoint. What would you recommend, and why? We give a limited answer to the above question. We focus on the computation of arithmetic expressions like a−b+c. When computing a−b we need different instructions depending on where a and b are to be found. On a programmable calculator for example, a or b may be on the stack, or stored in some memory register. We also need instructions that copy values from one place to another. Algorithms that generate code for arithmetic expressions tend to treat general purpose registers as a stack. Moreover, results about machines that perform all arithmetic in a hardware stack are directly applicable to machines with general purpose registers. We therefore start our study of instruction sets by looking at stack machines. We compare machines based on the number of instructions needed to compute a given expression. We then turn to algorithms that generate optimal programs for computing expressions on the various machines.