MetaCartSign in to MyCiteSeer

Include Citations | Advanced Search | Help

Include Citations | Advanced Search | Help

  SSA is Functional Programming

Download:
Download as a PDF | Download as a PS
unknown authors
http://www.cs.princeton.edu/fac/appel/papers/ssafun.ps
Add To MetaCart

Abstract:

Static Single-Assignment (SSA) form is an intermediate language designed to make optimization clean and efficient for imperative-language (Fortran, C) compilers. Lambda-calculus is an intermediate language that makes optimization clean and efficient for functionallanguage (Scheme, ML, Haskell) compilers. The SSA community draws pictures of graphs with basic blocks and flow edges, and the functional-language community writes lexically nested functions, but (as Richard Kelsey recently pointed out [9]) they're both doing exactly the same thing in different notation. SSA form. Many dataflow analyses need to find the use-sites of each defined variable or the definition-sites of each variable used in an expression. The def-use chain is a data structure that makes this efficient: for each statement in the flow graph, the compiler can keep a list of pointers to all the use sites of variables defined there, and a list of pointers to all definition sites of the variables used there. But when a variable has N definitions and M uses, we might need N M pointers to connect them. The designers of SSA form were trying to make an improved form of def-use chains that didn't suffer from this problem. Also, they were concerned with "getting the right number of names: " the programmer might use some variable i for several unrelated purposes in the same procedure-- for example, as the loop counter for two different loops-- and we can do more optimization if we split i into different variables i 1 and i 2. In SSA, each variable in the program has only one definition-- it is assigned to only once. The assignment might be in a loop, which is executed many times; so singleassignment is a static property of the program text, not a dynamic property of program execution. a x + y a 1 x + y b a

Citations

693 Advanced Compiler Design and Implementation – Muchnick - 1997
658 Efficiently computing static single assignment form and the control dependence graph – Cytron, Ferrante, et al. - 1991
606 Compiling with Continuations – Appel - 1992
287 Constant propagation with conditional branches – Wegman, Zadeck - 1991
265 The Calculi of Lambda-Conversion – Church - 1941
215 The Essence of Compiling with Continuations – Flanagan, Sabry, et al. - 1993
198 Zadeck. Detecting equality of variables in programs – Alpern, Wegman, et al. - 1988
161 Global value numbers and redundant computations – Rosen, Wegman, et al. - 1988
131 Rabbit: a compiler for Scheme – Steele - 1978
111 Modern Compiler Implementation in Java – Appel - 1999
90 Modern Compiler Implementation – Appel - 1998
72 Modern Compiler Implementation in ML – Appel - 2004
37 performance compilers for parallel computing – High
31 A correspondence between continuation passing style and static single assignment form – Kelsey - 1995
7 Continuations: A mathematical semantics which can deal with full jumps – Strachey, Wadsworth - 1974