Static single-assignment form: Difference between revisions

Content deleted Content added
mNo edit summary
Bender the Bot (talk | contribs)
 
(34 intermediate revisions by 16 users not shown)
Line 1:
{{Short description|Property of an intermediate representation in a compiler}}
In [[compiler]] design, '''static single assignment form''' (often abbreviated as '''SSA form''' or simply '''SSA''') is a propertytype of an [[intermediate representation]] (IR) that requireswhere each [[Variable (computer science)|variable]] to beis [[Assignment (computer science)|assigned]] exactly once. and defined before itSSA is used. Existing variables in themost originalhigh-quality IRoptimizing arecompilers splitfor intoimperative ''versions''languages, newincluding variables typically indicated by[[LLVM]], the original name with a subscript in textbooks, so that every definition gets its own version. In SSA form, [[use-defineGNU chain|use-defCompiler chainsCollection]] are explicit, and each contains amany singlecommercial elementcompilers.
 
There are efficient algorithms for converting programs into SSA form. To convert to SSA, existing variables in the original IR are split into versions, new variables typically indicated by the original name with a subscript, so that every definition gets its own version. Additional statements that assign to new versions of variables may also need to be introduced at the join point of two control flow paths. Converting from SSA form to machine code is also efficient.
One can expect to find SSA in a compiler for [[Fortran]], [[C (programming language)|C]], [[C++]],{{r|Kelsey}} or [[Java (programming language)|Java]] (Android Runtime);<ref>{{cite arXiv |eprint=2011.05608 |last1=Rogers |first1=Ian |title=Efficient global register allocation |year=2020 |class=cs.PL }}</ref><ref>{{cite video |title=The Evolution of ART - Google I/O 2016 |time=3m47s |url=https://www.youtube.com/watch?v=fwMM6g7wpQ8 |date=25 May 2016 |work=Google}}</ref> whereas in [[functional language]] compilers, such as those for [[Scheme (programming language)|Scheme]] and [[ML programming language|ML]], [[continuation-passing style]] (CPS) is generally used. SSA is formally equivalent to a well-behaved subset of CPS excluding non-local control flow, which does not occur when CPS is used as intermediate representation.<ref name="Kelsey">{{cite book
 
SSA makes numerous analyses needed for optimizations easier to perform, such as determining [[use-define chain]]s, because when looking at a use of a variable there is only one place where that variable may have received a value. Most optimizations can be adapted to preserve SSA form, so that one optimization can be performed after another with no additional analysis. The SSA based optimizations are usually more efficient and more powerful than their non-SSA form prior equivalents.
 
In [[functional language]] compilers, such as those for [[Scheme (programming language)|Scheme]] and [[ML programming language|ML]], [[continuation-passing style]] (CPS) is generally used. SSA is formally equivalent to a well-behaved subset of CPS excluding non-local control flow, so optimizations and transformations formulated in terms of one generally apply to the other. Using CPS as the intermediate representation is more natural for higher-order functions and interprocedural analysis. CPS also easily encodes [[call/cc]], whereas SSA does not.<ref name="Kelsey">{{cite book
|first1=Richard A. |last1=Kelsey
|title=Papers from the 1995 ACM SIGPLAN workshop on Intermediate representations |chapter=A correspondence between continuation passing style and static single assignment form |date=1995 |year=1995 |pages=13–22
|isbn=0897917545 |doi=10.1145/202529.202532 |s2cid=6207179 |chapter-url=https://wwwbernsteinbear.cs.purdue.educom/homesassets/suresh/502-Fall2008/papersimg/kelsey-ssa-cps.pdf}}</ref>
}}</ref> So optimizations and transformations formulated in terms of one immediately apply to the other.
 
== History ==
 
SSA was developed in the 1980s by several researchers at [[International Business Machines|IBM]] and. Kenneth Zadeck, a key member of the team, moved to Brown University as development continued.{{sfn|Rastello|Tichadou|2022|loc=sec. 1.4}}<ref name=Zadeck>{{cite conference|title=The Development of Static Single Assignment Form|url=https://compilers.cs.uni-saarland.de/ssasem/talks/Kenneth.Zadeck.pdf|conference=Static Single-Assignment Form Seminar|first=Kenneth|last=Zadeck|conference-url=https://compilers.cs.uni-saarland.de/ssasem/|___location=Autrans, France|date=April 2009}}</ref> A 1986 paper introduced birthpoints, identity assignments, and variable renaming such that variables had a single static assignment.<ref>{{cite journalbook |last1=Cytron |first1=Ron |last2=Lowry |first2=Andy |last3=Zadeck |first3=F. Kenneth |title=Code motion of control structures in high-level languages |journal=Proceedings of the 13th ACM SIGACT-SIGPLAN Symposiumsymposium on Principles of Programmingprogramming Languageslanguages - POPL '86 |chapter=Code motion of control structures in high-level languages |date=1986 |pages=70–85 |doi=10.1145/512644.512651|s2cid=9099471 }}</ref> A subsequent 1987 paper by [[Jeanne Ferrante]] and Ronald KaplanCytron<ref>{{cite conference |last1=Cytron, |first1=Ronald Kaplan, and |first2=Jeanne |last2=Ferrante. |title=What's in a name? Or, the value of renaming for parallelism detection and storage allocation. IBM|conference=International TJConference Watsonon ResearchParallel CenterProcessing, ICPP'87 1987. |pages=19–27}}</ref> proved that the renaming done in the previous paper removes all false dependencies for scalars.<ref name=Zadeck/> In 1988, Barry Rosen, [[Mark N. Wegman]], and Kenneth Zadeck replaced the identity assignments with Φ-functions, introduced the name "static single-assignment form", and demonstrated a now-common SSA optimization.<ref name="original">{{cite journalbook|author1 = Barry Rosen| author2 = Mark N. Wegman|author3 = F. Kenneth Zadeck| title = Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '88| chapter = Global value numbers and redundant computations| chapter-url=https://www.cs.wustl.edu/~cytron/cs531/Resources/Papers/valnum.pdf|title=Global value numbers and redundant computations|year=1988|journal=Proceedings ofpages the= 15th12–27| ACMdoi SIGPLAN-SIGACT= Symposium10.1145/73560.73562| onisbn Principles= of Programming Languages0-89791-252-7}}</ref> The name Φ-function was chosen by Rosen to be a more publishable version of "phony function".<ref name=Zadeck/> Alpern, Wegman, and Zadeck presented another optimization, but using the name "single static single assignment".<ref>{{cite book |last1=Alpern |first1=B. |last2=Wegman |first2=M. N. |last3=Zadeck |first3=F. K. |title=Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '88 |chapter=Detecting equality of variables in programs |date=1988 |pages=1–11 |doi=10.1145/73560.73561|isbn=0897912527 |s2cid=18384941 }}</ref> Finally, in 1989, Rosen, Wegman, and Zadeck and (independently), Cytron, and Ferrante workedfound onan methodsefficient means of computingconverting programs to SSA form. A few days before the submission deadline, the researchers realized they had substantially the same algorithm,<ref name=Zadeck/> and a 5-author paper was the result.<ref name="Cytron_1991">{{cite journal
|title=Efficiently computing static single assignment form and the control dependence graph
|author1=Cytron, Ron |author2=Ferrante, Jeanne |author3=Rosen, Barry K. |author4=Wegman, Mark N. |author5=Zadeck, F. Kenneth |name-list-style=amp |journal=ACM Transactions on Programming Languages and Systems |volume=13 |year=1991 |pages=451&ndash;490 |url=http://www.cs.utexas.edu/~pingali/CS380C/2010/papers/ssaCytron.pdf |issue=4
Line 29 ⟶ 32:
 
[[Compiler optimization]] algorithms that are either enabled or strongly enhanced by the use of SSA include:
* [[Constant propagationfolding]] – conversion of computations from runtime to compile time, e.g. treat the instruction <code>a=3*4+5;</code> as if it were <code>a=17;</code>
* [[Value range propagation]]<ref>[http://llvm.org/devmtg/2007-05/05-Lewycky-Predsimplify.pdf value range propagation]</ref> – precompute the potential ranges a calculation could be, allowing for the creation of branch predictions in advance
* [[Sparse conditional constant propagation]] – range-check some values, allowing tests to predict the most likely branch
Line 78 ⟶ 81:
</pre>
 
nodeNode 1 strictly dominates 2, 3, and 4 and the immediate predecessors of node 4 are nodes 2 and 3.
 
Dominance frontiers define the points at which Φ functions are needed. In the above example, when control is passed to node 4, the definition of <code>result</code> used depends on whether control was passed from node 2 or 3. Φ functions are not needed for variables defined in a dominator, as there is only one possible definition that can apply.
 
There is an efficient algorithm for finding dominance frontiers of each node. This algorithm was originally described in “Efficiently"Efficiently Computing Static Single Assignment Form and the Control Graph”Graph" by Ron Cytron, Jeanne Ferrante, et al. in 1991.<ref>{{cite journal |last1=Cytron |first1=Ron |last2=Ferrante |first2=Jeanne |last3=Rosen |first3=Barry K. |last4=Wegman |first4=Mark N. |last5=Zadeck |first5=F. Kenneth |title=Efficiently computing static single assignment form and the control dependence graph |journal=ACM Transactions on Programming Languages and Systems |date=1 October 1991 |volume=13 |issue=4 |pages=451–490 |doi=10.1145/115372.115320|s2cid=13243943 |doi-access=free }}</ref>
 
Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy of [[Rice University]] describe an algorithm in their paper titled ''A Simple, Fast Dominance Algorithm'':<ref name="Cooper_2001">{{cite journaltech report
|title=A Simple, Fast Dominance Algorithm |id=Rice University, CS Technical Report 06-33870
|lastlast1=Cooper |firstfirst1=Keith D. |author2last2=Harvey, |first2=Timothy J. |author3last3= Kennedy, |first3=Ken |year=2001 |url=https://www.cs.rice.edu/~keith/EMBED/dom.pdf |archive-url=https://web.archive.org/web/20220326234549/https://www.cs.rice.edu/~keith/EMBED/dom.pdf |archive-date=2022-03-26 |url-status=dead}}</ref>
 
'''for each''' node b
Line 113 ⟶ 116:
 
===Semi-pruned SSA===
Semi-pruned SSA form<ref>{{cite journaltech report |title=Practical Improvements to the Construction and Destruction of Static Single Assignment Form |year=1998 |last1=Briggs |first1=Preston |last2=Cooper |first2=Keith D. |last3=Harvey |first3=Timothy J. |last4=Simpson |first4=L. Taylor |url=http://www.cs.rice.edu/~harv/my_papers/ssa.pdf |url-status=dead |archive-url=https://web.archive.org/web/20100607003509/http://www.cs.rice.edu/~harv/my_papers/ssa.pdf |archive-date=2010-06-07 }}</ref> is an attempt to reduce the number of Φ functions without incurring the relatively high cost of computing live-variable information. It is based on the following observation: if a variable is never live upon entry into a basic block, it never needs a Φ function. During SSA construction, Φ functions for any "block-local" variables are omitted.
 
Computing the set of block-local variables is a simpler and faster procedure than full live-variable analysis, making semi-pruned SSA form more efficient to compute than pruned SSA form. On the other hand, semi-pruned SSA form will contain more Φ functions.
Line 119 ⟶ 122:
===Block arguments===
 
Block arguments are an alternative to Φ functions that is representationally identical but in practice can be more convenient during optimization. Blocks are named and take a list of block arguments, notated as function parameters. When calling a block the block arguments are bound to specified values. [[MLton]], [[Swift (programming language)|Swift SIL]] SIL, and LLVM [[MLIR (software)|MLIR]] use block arguments.<ref>{{cite web |title=Block Arguments vs PHI nodes - MLIR Rationale |url=https://mlir.llvm.org/docs/Rationale/Rationale/#block-arguments-vs-phi-nodes |website=mlir.llvm.org |access-date=4 March 2022}}</ref>
 
==Converting out of SSA form==
Line 135 ⟶ 138:
 
==Compilers using SSA form==
{{exampleexcessive farmexamples|section|date=August 2018}}
 
=== Open-source ===
SSA form is a relatively recent development in the compiler community. As such, many older compilers only use SSA form for some part of the compilation or optimization process, but most do not rely on it. Examples of compilers that rely heavily on SSA form include:
 
* [[Mono (software)|Mono]] uses SSA in its JIT compiler called Mini.
* The ETH [[Oberon-2]] compiler was one of the first public projects to incorporate "GSA", a variant of SSA.
* [[WebKit]] uses SSA in its JIT compilers.<ref>{{Cite web|url=https://webkit.org/blog/3362/introducing-the-webkit-ftl-jit/|title=Introducing the WebKit FTL JIT|date=13 May 2014}}</ref><ref>{{Cite web|url=https://webkit.org/blog/5852/introducing-the-b3-jit-compiler/|title=Introducing the B3 JIT Compiler|date=15 February 2016}}</ref>
* [[Swift (programming language)|Swift]] defines its own SSA form above LLVM IR, called SIL (Swift Intermediate Language).<ref>{{Cite web|url=https://github.com/appleswiftlang/swift/blob/mastermain/docs/SIL/SIL.rstmd|title=Swift Intermediate Language (GitHub)|website=[[GitHub]]|date=30 October 2021}}</ref><ref>{{Cite web|url=https://www.youtube.com/watch?v=Ntj8ab-5cvE |archive-url=https://ghostarchive.org/varchive/youtube/20211221/Ntj8ab-5cvE |archive-date=2021-12-21 |url-status=live|title=Swift's High-Level IR: A Case Study of Complementing LLVM IR with Language-Specific Optimization, LLVM Developers Meetup 10/2015|website=[[YouTube]]|date=9 November 2015 }}{{cbignore}}</ref>
* The [[Erlang (programming language)|Erlang]] rewrotecompiler theirwas compilerrewritten in OTP 22.0 to "internally use an intermediate representation based on Static Single Assignment (SSA).", Withwith plans for further optimizations built on top of SSA in future releases.<ref>{{Cite web|url=http://www.erlang.org/news/132|title=OTP 22.0 Release Notes}}</ref>
* The [[LLVM]] Compiler Infrastructure uses SSA form for all scalar register values (everything except memory) in its primary code representation. SSA form is only eliminated once register allocation occurs, late in the compile process (often at link time).
* Since the version 4 (released in April 2005)The [[GNU Compiler Collection | GCC]], the [[GNU Compiler Collection]],(GCC) makes extensive use of SSA since version 4 (released in April 2005). The [[front and back ends|frontends]] generate "[[GIMPLE#GENERIC and GIMPLE|GENERIC]]" code that is then converted into "[[GIMPLE#GENERIC and GIMPLE|GIMPLE]]" code by the "gimplifier". High-level optimizations are then applied on the SSA form of "GIMPLE". The resulting optimized intermediate code is then translated into [[Register Transfer Language|RTL]], on which low-level optimizations are applied. The architecture-specific [[Front and back ends|backend]]s finally turn RTL into [[assembly language]].
* The [[Open64]] compiler uses SSA form in its global scalar optimizer, though the code is brought into SSA form before and taken out of SSA form afterwards. Open64 uses extensions to SSA form to represent memory in SSA form as well as scalar values.
* [[Go (programming language)|Go]] (1.7: for x86-64 architecture only; 1.8: for all supported architectures).<ref>{{Cite web|url=https://golang.org/doc/go1.7#compiler|title=Go 1.7 Release Notes - The Go Programming Language|website=golang.org|access-date=2016-08-17}}</ref><ref>{{Cite web|url=https://golang.org/doc/go1.8#compiler|title=Go 1.8 Release Notes - The Go Programming Language|website=golang.org|access-date=2017-02-17}}</ref>
* Since the version 4 (released in April 2005) [[GNU Compiler Collection | GCC]], the [[GNU Compiler Collection]], makes extensive use of SSA. The [[front and back ends|frontends]] generate "[[GIMPLE#GENERIC and GIMPLE|GENERIC]]" code that is then converted into "[[GIMPLE#GENERIC and GIMPLE|GIMPLE]]" code by the "gimplifier". High-level optimizations are then applied on the SSA form of "GIMPLE". The resulting optimized intermediate code is then translated into [[Register Transfer Language|RTL]], on which low-level optimizations are applied. The architecture-specific [[Front and back ends|backend]]s finally turn RTL into [[assembly language]].
* [[IBM]]'s open source adaptive [[Java virtual machine]], [[Jikes RVM]], uses extended Array SSA, an extension of SSA that allows analysis of scalars, arrays, and object fields in a unified framework. Extended Array SSA analysis is only enabled at the maximum optimization level, which is applied to the most frequently executed portions of code.
* In 2002, [http://citeseer.ist.psu.edu/721276.html researchers modified] IBM's JikesRVM (named Jalapeño at the time) to run both standard Java [[bytecode]] and a typesafe SSA ([[SafeTSA]]) bytecode class files, and demonstrated significant performance benefits to using the SSA bytecode.
* [[Oracle Corporation|Oracle]]'s [[HotSpot (virtual machine)|HotSpot Java Virtual Machine]] uses an SSA-based intermediate language in its JIT compiler.<ref>{{cite web|url=http://www.oracle.com/technetwork/java/whitepaper-135217.html|publisher=Oracle Corporation|title=The Java HotSpot Performance Engine Architecture}}</ref>
* Microsoft [[Visual C++]] compiler backend available in [[Microsoft Visual Studio]] 2015 Update 3 uses SSA<ref>{{cite web|url=https://blogs.msdn.microsoft.com/vcblog/2016/05/04/new-code-optimizer|title=Introducing a new, advanced Visual C++ code optimizer|date=4 May 2016}}</ref>
* [[Mono (software)|Mono]] uses SSA in its JIT compiler called Mini.
* [http://jackcc.sf.net jackcc] is an open-source compiler for the academic instruction set Jackal 3.0. It uses a simple 3-operand code with SSA for its intermediate representation. As an interesting variant, it replaces Φ functions with a so-called SAME instruction, which instructs the register allocator to place the two live ranges into the same physical register.
* Although not a compiler, the [http://boomerang.sourceforge.net/ Boomerang] decompiler uses SSA form in its internal representation. SSA is used to simplify expression propagation, identifying parameters and returns, preservation analysis, and more.
* [[Portable.NET]] uses SSA in its JIT compiler.
* [http://pp.ipd.kit.edu/firm/ libFirm] a completely graph based SSA intermediate representation for compilers. libFirm uses SSA form for all scalar register values until code generation by use of an SSA-aware register allocator.
* The Illinois Concert Compiler circa 1994<ref>{{cite web|url=http://www-csag.ucsd.edu/projects/concert.html|title=Illinois Concert Project}}</ref> used a variant of SSA called SSU (Static Single Use) which renames each variable when it is assigned a value, and in each conditional context in which that variable is used; essentially the static single information form mentioned above. The SSU form is documented in [http://www-csag.ucsd.edu/papers/jplevyak-thesis.ps John Plevyak's Ph.D Thesis].
* The COINS compiler uses SSA form optimizations as explained [https://web.archive.org/web/20040531024854/http://www.is.titech.ac.jp/~sassa/coins-www-ssa/english/ here].
* The [[Mozilla]] [[Firefox]] [[SpiderMonkey]] JavaScript engine uses SSA-based IR.<ref>{{cite web|url=https://wiki.mozilla.org/IonMonkey/Overview|title=IonMonkey Overview}},</ref>
* The [[Chromium (web browser)|Chromium]] [[V8 JavaScript engine]] implements SSA in its Crankshaft compiler infrastructure as [https://blog.chromium.org/2010/12/new-crankshaft-for-v8.html announced in December 2010]
* [[PyPy]] uses a linear SSA representation for traces in its JIT compiler.
* The [[Android Runtime]]<ref>{{cite video |title=The Evolution of ART - Google I/O 2016 |time=3m47s |url=https://www.youtube.com/watch?v=fwMM6g7wpQ8 |date=25 May 2016 |work=Google}}</ref> and the [[Dalvik (software)|Dalvik Virtual Machine]] use SSA.<ref>{{cite web |title=JIT through the ages |url=http://www.cs.columbia.edu/~aho/cs6998/reports/12-12-11_Ramanan_JIT.pdf |last=Ramanan |first=Neeraja | date=12 Dec 2011 }}</ref>
* [[Android (operating system)|Android]]'s [[Dalvik (software)|Dalvik]] virtual machine uses SSA in its JIT compiler.
* [[Android (operating system)|Android]]'s new optimizing compiler for the [[Android Runtime]] uses SSA for its IR.
* The Standard ML compiler [[MLton]] uses SSA in one of its intermediate languages.
* [[LuaJIT]] makes heavy use of SSA-based optimizations.<ref>{{cite web|url=http://wiki.luajit.org/Optimizations|title=Bytecode Optimizations|publisher=the LuaJIT project}}</ref>
* The [[PHP]] and [[Hack (programming language)|Hack]] compiler [[HHVM]] uses SSA in its IR.<ref>{{cite web|url=https://github.com/facebook/hhvm/blob/master/hphp/doc/ir.specification|title=HipHop Intermediate Representation (HHIR)|website=[[GitHub]]|date=30 October 2021}}</ref>
* ReservoirThe Labs' R-Stream[[OCaml]] compiler supportsuses non-SSA (quadin list), SSAits andCMM SSIIR (Staticwhich Singlestands Informationfor C--).<ref>{{citeCite journal|title=Static Single Information Formweb |last1=AnanianChambart |first1=C. ScottPierre |last2=RinardLaviron |first2=MartinVincent |yearlast3=1999Pinto |citeseerxfirst3=Dario |date=2024-03-18 10.1.1.1.9976}}</ref>)|title=Behind forms.<ref>{{citethe Scenes of the OCaml Optimising Compiler book|url=https://www.springerocamlpro.com/usblog/book2024_03_18_the_flambda2_snippets_0/9780387097657 |titlewebsite=Encyclopedia of ParallelOCaml ComputingPro}}</ref>
* libFirm, a library for use as the [[Compiler#Three-stage compiler structure|middle and back ends of a compiler]], uses SSA form for all scalar register values until code generation by use of an SSA-aware register allocator.<ref>{{cite web|url=http://pp.ipd.kit.edu/firm/|title=Firm - Optimization and Machine Code Generation}}</ref>
* [[Go (programming language)|Go]] (1.7: for x86-64 architecture only; 1.8: for all supported architectures).<ref>{{Cite web|url=https://golang.org/doc/go1.7#compiler|title=Go 1.7 Release Notes - The Go Programming Language|website=golang.org|access-date=2016-08-17}}</ref><ref>{{Cite web|url=https://golang.org/doc/go1.8#compiler|title=Go 1.8 Release Notes - The Go Programming Language|website=golang.org|access-date=2017-02-17}}</ref>
* [[SPIR-V]], the shading language standard for the [[Vulkan (API)|Vulkan graphics API]] and [[compute kernel|kernel language]] for [[OpenCL]] compute API, is an SSA representation.<ref>{{cite web|url=https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.pdf|title=SPIR-V spec}}</ref>
* Various [[Mesa (computer graphics)|Mesa]] drivers via NIR, an SSA representation for shading languages.<ref>{{Cite web|url=https://lists.freedesktop.org/archives/mesa-dev/2014-December/072761.html|title=Reintroducing NIR, a new IR for mesa|last=Ekstrand|first=Jason|date=16 December 2014 }}</ref>
 
* [[WebKit]] uses SSA in its JIT compilers.<ref>{{Cite web|url=https://webkit.org/blog/3362/introducing-the-webkit-ftl-jit/|title=Introducing the WebKit FTL JIT|date=13 May 2014}}</ref><ref>{{Cite web|url=https://webkit.org/blog/5852/introducing-the-b3-jit-compiler/|title=Introducing the B3 JIT Compiler|date=15 February 2016}}</ref>
=== Commercial ===
* [[Swift (programming language)|Swift]] defines its own SSA form above LLVM IR, called SIL (Swift Intermediate Language).<ref>{{Cite web|url=https://github.com/apple/swift/blob/master/docs/SIL.rst|title=Swift Intermediate Language (GitHub)|website=[[GitHub]]|date=30 October 2021}}</ref><ref>{{Cite web|url=https://www.youtube.com/watch?v=Ntj8ab-5cvE |archive-url=https://ghostarchive.org/varchive/youtube/20211221/Ntj8ab-5cvE |archive-date=2021-12-21 |url-status=live|title=Swift's High-Level IR: A Case Study of Complementing LLVM IR with Language-Specific Optimization, LLVM Developers Meetup 10/2015|website=[[YouTube]]}}{{cbignore}}</ref>
 
* [[Erlang (programming language)|Erlang]] rewrote their compiler in OTP 22.0 to "internally use an intermediate representation based on Static Single Assignment (SSA)." With plans for further optimizations built on top of SSA in future releases.<ref>{{Cite web|url=http://www.erlang.org/news/132|title=OTP 22.0 Release Notes}}</ref>
* [[Oracle Corporation|Oracle]]'s [[HotSpot (virtual machine)|HotSpot Java Virtual Machine]] uses an SSA-based intermediate language in its JIT compiler.<ref>{{cite web|url=httphttps://www.oracle.com/technetwork/java/technologies/whitepaper-135217.html|publisher=Oracle Corporation|title=The Java HotSpot Performance Engine Architecture}}</ref>
* Microsoft [[Visual C++]] compiler backend available in [[Microsoft Visual Studio]] 2015 Update 3 uses SSA<ref>{{cite web|url=https://blogs.msdn.microsoft.com/vcblog/2016/05/04/new-code-optimizer|title=Introducing a new, advanced Visual C++ code optimizer|date=4 May 2016}}</ref>
* [[SPIR-V]], the shading language standard for the [[Vulkan (API)|Vulkan graphics API]] and [[compute kernel|kernel language]] for [[OpenCL]] compute API, is an SSA representation.<ref>{{cite web|url=https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.pdf|title=SPIR-V spec}}</ref>
* The IBM family of XL compilers, which include [[IBM XL C/C++ Compilers|C, C++]] and Fortran.<ref>{{cite journal|url=https://www.cs.rice.edu/~vs3/PDF/ibmjrd97.pdf|title=Automatic selection of high-order transformations in the IBM XL FORTRAN compilers|first=V.|last=Sarkar|journal=[[IBM Journal of Research and Development]]|volume=41|issue=3|pages=233–264|date=May 1997|publisher=IBM|doi=10.1147/rd.413.0233 }}</ref>
* NVIDIA [[CUDA]]<ref>{{cite journal|url=https://www.researchgate.net/publication/235605681|title=CUDA: Compiling and optimizing for a GPU platform|date=2012 |doi=10.1016/j.procs.2012.04.209 |last1=Chakrabarti |first1=Gautam |last2=Grover |first2=Vinod |last3=Aarts |first3=Bastiaan |last4=Kong |first4=Xiangyun |last5=Kudlur |first5=Manjunath |last6=Lin |first6=Yuan |last7=Marathe |first7=Jaydeep |last8=Murphy |first8=Mike |last9=Wang |first9=Jian-Zhong |journal=Procedia Computer Science |volume=9 |pages=1910–1919 |doi-access=free }}</ref>
 
=== Research and abandoned ===
 
* The ETH [[Oberon-2]] compiler was one of the first public projects to incorporate "GSA", a variant of SSA.
* The [[Open64]] compiler usesused SSA form in its global scalar optimizer, though the code is brought into SSA form before and taken out of SSA form afterwards. Open64 uses extensions to SSA form to represent memory in SSA form as well as scalar values.
* In 2002, [http://citeseer.ist.psu.edu/721276.html researchers modified] IBM's JikesRVM (named Jalapeño at the time) to run both standard Java [[bytecode]] and a typesafe SSA ([[SafeTSA]]) bytecode class files, and demonstrated significant performance benefits to using the SSA bytecode.
* [http://jackcc.sf.net jackcc] is an open-source compiler for the academic instruction set Jackal 3.0. It uses a simple 3-operand code with SSA for its intermediate representation. As an interesting variant, it replaces Φ functions with a so-called SAME instruction, which instructs the register allocator to place the two live ranges into the same physical register.
* The Illinois Concert Compiler circa 1994<ref>{{cite web|url=http://www-csag.ucsd.edu/projects/concert.html|title=Illinois Concert Project|archive-url=https://web.archive.org/web/20140313140417/http://www-csag.ucsd.edu/projects/concert.html|archive-date=2014-03-13|url-status=dead}}</ref> used a variant of SSA called SSU (Static Single Use) which renames each variable when it is assigned a value, and in each conditional context in which that variable is used; essentially the static single information form mentioned above. The SSU form is documented in [http://www-csag.ucsd.edu/papers/jplevyak-thesis.ps John Plevyak's Ph.D Thesis].
* The COINS compiler uses SSA form optimizations as explained [https://web.archive.org/web/20040531024854/http://www.is.titech.ac.jp/~sassa/coins-www-ssa/english/ here].
* Reservoir Labs' R-Stream compiler supports non-SSA (quad list), SSA and SSI (Static Single Information<ref>{{cite tech report |url=https://cscott.net/Publications/ssi.pdf |title=Static Single Information Form |last1=Ananian |first1=C. Scott |last2=Rinard |first2=Martin |year=1999|citeseerx = 10.1.1.1.9976}}</ref>) forms.<ref>{{cite book|url=https://www.springer.com/us/book/9780387097657|title=Encyclopedia of Parallel Computing}}</ref>
* Although not a compiler, the [httphttps://boomerang.sourceforge.net/ Boomerang] decompiler uses SSA form in its internal representation. SSA is used to simplify expression propagation, identifying parameters and returns, preservation analysis, and more.
* [[DotGNU]] Portable.NET]] usesused SSA in its JIT compiler.
 
==References==