Single-Pass Generation of Static Single Assignment Form for Structured Languages (1994) [5 citations — 0 self]
Abstract:
this paper we present a technique for generating SSA form in a single pass directly from the source text of a program. It can be applied to structured programs, i.e., to programs that contain only assignments and structured statements (such as IF, CASE, WHILE, REPEAT, or FOR) but no goto statements. For such programs the join nodes and thus the places where to insert f-assignments are immediately known so that f-assignments can be generated on the fly during parsing. This is useful for languages such as Simula[3], Modula-2 [13] or Oberon [14] that lack goto statements at all. If language independence is desired our algorithm can also be applied to control flow graphs instead of source programs. The advantage of generating SSA form directly during parsing is that it saves an intermediate step. Instead of building a high-level representation of a program and then transforming it, we directly generate machine-specific instructions in SSA form ready for optimizations. This saves time and memory. However, the same technique could be used for generating a machine-independent representation as well. We do not deal here with alias problems caused by assignments to array elements, to parameters 4 passed by reference, and to variables that are referenced via pointers. These problems can be dealt with in the same way as described in [5]. While Cytron's method requires the construction of the dominator tree---itself a non-trivial step--- our method does not need such a data structure. However, the dominator tree is useful in subsequent optimizations so that it is worth showing that for structured programs it can be built in a single pass during parsing, too. Section 2 of this paper explains our algorithm for generating SSA form while Section 3 shows how to build the dominator tre...
Citations
| 644 | Efficiently computing static single assignment form and the control dependence graph – Cytron, Ferrante, et al. - 1991 |
| 265 | Constant propagation with conditional branches – Wegman, Zadeck - 1991 |
| 215 | Integrating non{interfering versions of programs – Horwitz, Prins, et al. - 1989 |
| 189 | Zadeck. Detecting equality of variables in programs – Alpern, Wegman, et al. - 1988 |
| 148 | Global value numbers and redundant computation – Rosen, Wegman, et al. - 1988 |
| 113 | A Fast Algorithm for Finding Dominators in a Flowgraph – Lengauer, Tarjan - 1979 |
| 79 | Beyond induction variables – Wolfe - 1992 |
| 57 | Dependence-based program analysis – Johnson, Pingali - 1993 |
| 42 | Code motion of control structures in high-level languages – Cytron, Lowry, et al. - 1986 |
| 8 | Register Allocation, Renaming and Their Impact on Fine-Grain Parallelism – Nicolau, Potasman, et al. - 1992 |
| 6 | Using static single assignment form in a code optimizer – MCCONNELL, JOHNSON - 1992 |

