Journal Article10.1080/00207167508803101
On the Sethi-Ullman algorithm
2
TL;DR: A dag labeling algorithm is described which gives the minimum number of registers required to evaluate any node without any stores, and a subclass of dags is defined, the 1-load binary dags, employing a tree-like grammar, and the Sethi-Ullman algorithm is modified to include this subclass.
read more
Abstract: A directed acyclic graph (dag) can be used to represent an arithmetic expression consisting of sequences of binary operations on arguments. The Sethi-Ullman algorithm (Journal of the ACM, Vol. 17 No. 4, pp. 715-728) generates optimal object code for a machine with N≧1 registers and unlimited memory capacity when the dag is a binary tree. We first describe a dag labeling algorithm which gives the minimum number of registers required to evaluate any node without any stores. We then define a subclass of dags, the 1-load binary dags, employing a tree-like grammar, and modify the Sethi-Ullman algorithm to include this subclass but only when N = 2 registers. The proof of optimality relies on the use of syntax directed translation schemas. Modification of the algorithm to include all dags, or to allow N > 2 registers, appears difficult.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Code Generation for Expressions with Common Subexpressions.
Alfred V. Aho,S. C. Johnson,Jeffrey D. Ullman +2 more
- 01 Jan 1976
TL;DR: This paper shows the problem of generating optimal code for expressions containing common subexpressions is computationally difficult, even for simple expressions and simple machines.
168
Code Generation for Expressions with Common Subexpressions
TL;DR: In this paper, the problem of generating optimal code for expressions containing common subexpressions is shown to be computationally difficult, even for simple expressions and simple machines, and some heuristics for code generation are given and their worst-case behavior is analyzed.
151
References
Adapting optimal code generation for arithmetic expressions to the instruction sets available on present-day computers
TL;DR: The SeTF schedule for this example has less latency time than the schedule in Figure 3(a), however, when two or more distinct SErF schedules exist, they may not all be o f the same length.
11
The Generation of Optimal Code for Arithmetic Expressions
Ravi Sethi,Jeffrey D. Ullman +1 more
TL;DR: It is shown that the algorithms presented here also minimize the number of storage references in the evaluation, and they are shown to take the shortest possible number of instructions.