Content deleted Content added
move history to history section and expand |
Alter: template type, journal. Add: date, isbn, s2cid, class, year, title, authors 1-1. | Use this tool. Report bugs. | #UCB_Gadget |
||
Line 1:
In [[compiler]] design, '''static single assignment form''' (often abbreviated as '''SSA form''' or simply '''SSA''') is a property of an [[intermediate representation]] (IR) that requires each [[Variable (computer science)|variable]] to be [[Assignment (computer science)|assigned]] exactly once and defined before it is used. Existing variables in the original IR are split into ''versions'', new variables typically indicated by the original name with a subscript in textbooks, so that every definition gets its own version. In SSA form, [[use-define chain|use-def chains]] are explicit and each contains a single element.
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
|title=A Correspondence between Continuation Passing Style and Static Single Assignment Form
|first1=Richard A. |last1=Kelsey
Line 10:
== History ==
SSA was developed in the 1980s by several researchers at [[International Business Machines|IBM]] and Kenneth Zadeck of Brown University.{{sfn|Rastello|Tichadou|2022|loc=sec. 1.4}}<ref name=Zadeck>{{cite
|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–490 |url=http://www.cs.utexas.edu/~pingali/CS380C/2010/papers/ssaCytron.pdf |issue=4
Line 165:
* [[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>
* [[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>
Line 176:
===General references===
* {{cite book |title=SSA-based compiler design |date=2022 |___location=Cham |isbn=978-3-030-80515-9 |doi=10.1007/978-3-030-80515-9 |s2cid=63274602 |language=en|editor-first1=Fabrice|editor-last1=Rastello|editor-first2=Florent Bouchez|editor-last2=Tichadou|url=https://pfalcon.github.io/ssabook/latest/book-full.pdf}}
* {{cite book |author=Appel, Andrew W.
|title=Modern Compiler Implementation in ML
|