Jump to content

LLVM: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation)
 
(24 intermediate revisions by 21 users not shown)
Line 1: Line 1:
{{Short description|Compiler backend for multiple programming languages}}
{{Short description|Compiler backend for multiple programming languages}}
{{Infobox software
{{Infobox software
| name = LLVM
| name = LLVM
| logo = LLVM logo.png
| logo = LLVM logo.png
| logo caption = The LLVM logo, a stylized [[wyvern]]<ref name="logo">{{Cite web|url=https://llvm.org/Logo.html|title=LLVM Logo|website=The LLVM Compiler Infrastructure Project}}</ref>
| logo caption = The LLVM logo, a stylized [[wyvern]]<ref name="logo">{{Cite web |url=https://llvm.org/Logo.html |title=LLVM Logo |website=The LLVM Compiler Infrastructure Project}}</ref>
| author = [[Chris Lattner]], [[Vikram Adve]]
| author = [[Chris Lattner]], [[Vikram Adve]]
| developer = LLVM Developer Group
| developer = LLVM Developer Group
| released = {{start date and age|2003}}
| released = {{start date and age|2003}}
| latest release version = {{wikidata|property|preferred|references|edit|Q223490|P348|P548=Q2804309}}
| latest release version = {{wikidata|property|preferred|references|edit|Q223490|P348|P548=Q2804309}}
| latest release date = {{wikidata|qualifier|preferred|single|Q223490|P348|P548=Q2804309|P577}}
| latest release date = {{wikidata|qualifier|preferred|single|Q223490|P348|P548=Q2804309|P577}}
| latest preview version = {{wikidata|property|preferred|references|edit|Q223490|P348|P548=Q51930650}}
| latest preview version = {{wikidata|property|preferred|references|edit|Q223490|P348|P548=Q51930650}}
| latest preview date = {{wikidata|qualifier|preferred|single|Q223490|P348|P548=Q51930650|P577}}
| latest preview date = {{wikidata|qualifier|preferred|single|Q223490|P348|P548=Q51930650|P577}}
| programming language = [[C++]]
| programming language = [[C++]]
| operating system = [[Cross-platform]]
| operating system = [[Cross-platform software|Cross-platform]]
| genre = [[Compiler]]
| genre = [[Compiler]]
| license = [[University of Illinois/NCSA Open Source License|UIUC]] ([[BSD licenses|BSD-style]])<br>[[Apache License 2.0]] with LLVM Exceptions (v9.0.0 or later)<ref name="License">{{cite web|url=https://releases.llvm.org/9.0.0/LICENSE.TXT|title=LICENSE.TXT|publisher=llvm.org|access-date=2019-09-24}}</ref>
| license = [[Apache License 2.0]] with LLVM Exceptions (v9.0.0 or later)<ref name="License">{{cite web|url=https://releases.llvm.org/9.0.0/LICENSE.TXT|title=LICENSE.TXT|publisher=llvm.org|access-date=2019-09-24}}</ref><br>
Legacy license:<ref>{{Cite web |title=LLVM Developer Policy — LLVM 20.0.0git documentation |url=https://llvm.org/docs/DeveloperPolicy.html#legacy |access-date=2024-11-09 |website=llvm.org}}</ref><!-- "The last paragraph notwithstanding, the LLVM Project is in the middle of a large effort to change licenses .. Starting on 2024-06-01 (first of June 2024), new contributions only need to be covered by the new LLVM license, i.e. Apache-2.0 WITH LLVM-exception. Before this date, the project required all contributions to be made under both the new license and the legacy license. ..
| website = {{URL|https://www.llvm.org}}

A small portion of LLVM code remains exclusively covered by the legacy license. Contributions after 2024-06-01 are covered exclusively by the new license."--> [[University of Illinois/NCSA Open Source License|UIUC]] ([[BSD licenses|BSD-style]])
| website = {{URL|https://www.llvm.org}}
}}
}}


'''LLVM''' is a set of [[compiler]] and [[toolchain]] technologies<ref>{{Cite web| title = The LLVM Compiler Infrastructure Project| access-date = March 11, 2016| url = http://llvm.org/}}</ref> that can be used to develop a [[Compiler#Front end|frontend]] for any [[programming language]] and a [[Compiler#Backend|backend]] for any [[instruction set architecture]]. LLVM is designed around a [[language-independent specification|language-independent]] [[intermediate representation]] (IR) that serves as a [[Software portability|portable]], high-level [[assembly language]] that can be [[optimizing compiler|optimized]] with a variety of transformations over multiple passes.<ref name="langref">{{cite web|url=http://llvm.org/docs/LangRef.html|title=LLVM Language Reference Manual|access-date=June 9, 2019}}</ref> The name ''LLVM'' originally stood for ''Low Level Virtual Machine,'' though the project has expanded and the name is no longer officially an initialism.
'''LLVM''' is a set of [[compiler]] and [[toolchain]] technologies<ref>{{Cite web| title = The LLVM Compiler Infrastructure Project| access-date = March 11, 2016| url = http://llvm.org/}}</ref> that can be used to develop a [[Compiler#Front end|frontend]] for any [[programming language]] and a [[Compiler#Backend|backend]] for any [[instruction set architecture]]. LLVM is designed around a [[language-independent specification|language-independent]] [[intermediate representation]] (IR) that serves as a [[Software portability|portable]], high-level [[assembly language]] that can be [[optimizing compiler|optimized]] with a variety of transformations over multiple passes.<ref name="langref">{{cite web|url=http://llvm.org/docs/LangRef.html|title=LLVM Language Reference Manual|access-date=June 9, 2019}}</ref> The name ''LLVM'' originally stood for ''Low Level Virtual Machine,'' though the project has expanded and the name is [[orphan initialism|no longer officially an initialism]].


LLVM is written in [[C++]] and is designed for [[compile-time]], [[Linker (computing)|link-time]], [[runtime (program lifecycle phase)|run-time]], and "idle-time" optimization. Originally implemented for [[C (programming language)|C]] and C++, the language-agnostic design of LLVM has since spawned a wide variety of frontends: languages with compilers that use LLVM (or which do not directly use LLVM but can generate compiled programs as LLVM IR) include [[ActionScript]], [[Ada (programming language)|Ada]], [[C Sharp (programming language)|C#]],<ref>{{Cite web|title=Announcing LLILC - A new LLVM-based Compiler for .NET|url=https://dotnetfoundation.org/blog/2015/04/14/announcing-llilc-llvm-for-dotnet|access-date=2020-09-12|website=dotnetfoundation.org|archive-date=December 12, 2021|archive-url=https://web.archive.org/web/20211212184833/https://dotnetfoundation.org/blog/2015/04/14/announcing-llilc-llvm-for-dotnet|url-status=dead}}</ref><ref>{{citation |title= Mono LLVM |access-date= March 10, 2013 |url= http://www.mono-project.com/Mono_LLVM}}</ref><ref>{{cite book|title=The Architecture of Open Source Applications|url=http://www.aosabook.org/|chapter=LLVM|chapter-url=http://www.aosabook.org/en/llvm.html|author=Chris Lattner|editor1=Amy Brown|editor2=Greg Wilson|year=2011}}</ref> [[Common Lisp]], [[PicoLisp]], [[Crystal (programming language)|Crystal]], [[CUDA]], [[D (programming language)|D]], [[Delphi (programming language)|Delphi]], [[Dylan (programming language)|Dylan]], [[Forth (programming language)|Forth]],<ref>{{Cite web|url=https://github.com/reschivon/movForth|title = MovForth|website = [[GitHub]]|date = November 28, 2021}}</ref> [[Fortran]], [[FreeBASIC]], [[Free Pascal]], [[LabVIEW|Graphical G]],<ref>{{cite web|url=http://www.electronicdesign.com/test-measurement/what-s-difference-between-labview-2017-and-labview-nxg|title=What's the Difference Between LabVIEW 2017 and LabVIEW NXG?|author=William Wong|date=May 23, 2017|website=[[Electronic Design (magazine)|Electronic Design]]}}</ref> [[Halide (programming language)|Halide]], [[Haskell (programming language)|Haskell]], [[Java bytecode]], [[Julia (programming language)|Julia]], [[Kotlin (programming language)|Kotlin]], [[Lua (programming language)|Lua]], [[Objective-C]], [[OpenCL]],<ref>{{cite web
LLVM is written in [[C++]] and is designed for [[compile-time]], [[Linker (computing)|link-time]], [[runtime (program lifecycle phase)|runtime]], and "idle-time" optimization. Originally implemented for [[C (programming language)|C]] and C++, the language-agnostic design of LLVM has since spawned a wide variety of frontends: languages with compilers that use LLVM (or which do not directly use LLVM but can generate compiled programs as LLVM IR) include [[ActionScript]], [[Ada (programming language)|Ada]], [[C Sharp (programming language)|C#]] for [[.NET]],<ref>{{Cite web |title=Announcing LLILC - A new LLVM-based Compiler for .NET |url=https://dotnetfoundation.org/blog/2015/04/14/announcing-llilc-llvm-for-dotnet|access-date=2020-09-12 |website=dotnetfoundation.org|archive-date=December 12, 2021 |archive-url=https://web.archive.org/web/20211212184833/https://dotnetfoundation.org/blog/2015/04/14/announcing-llilc-llvm-for-dotnet |url-status=dead}}</ref><ref>{{cite web |url= http://www.mono-project.com/Mono_LLVM |title=Mono LLVM |access-date=March 10, 2013}}</ref><ref>{{cite book |last=Lattner |first=Chris |author-link=Chris Lattner |editor1-last=Brown |editor1-first=Amy |editor2-last=Wilson |editor2-first=Greg |year=2011 |title=The Architecture of Open Source Applications |url=http://www.aosabook.org/ |chapter=LLVM |chapter-url=http://www.aosabook.org/en/llvm.html}}</ref> [[Common Lisp]], [[PicoLisp]], [[Crystal (programming language)|Crystal]], [[CUDA]], [[D (programming language)|D]], [[Delphi (software)|Delphi]],<ref>{{cite web |title=LLVM-based Delphi Compilers |url=https://docwiki.embarcadero.com/RADStudio/Sydney/en/LLVM-based_Delphi_Compilers |publisher=Embarcadero |access-date=26 November 2024}}</ref> [[Dylan (programming language)|Dylan]], [[Forth (programming language)|Forth]],<ref>{{Cite web |url=https://github.com/reschivon/movForth |title=MovForth |website=[[GitHub]] |date=November 28, 2021}}</ref> [[Fortran]], [[FreeBASIC]], [[Free Pascal]], [[Halide (programming language)|Halide]], [[Haskell]], [[Idris (programming language)|Idris]],<ref>{{Cite web |title=Rapid |url=https://rapid.sinyax.net/ |access-date=2024-11-22 |website=Rapid |language=en-gb}}</ref> [[Java bytecode]], [[Julia (programming language)|Julia]], [[Kotlin (programming language)|Kotlin]], [[LabVIEW]]'s G language,<ref>{{cite web|url=http://www.electronicdesign.com/test-measurement/what-s-difference-between-labview-2017-and-labview-nxg|title=What's the Difference Between LabVIEW 2017 and LabVIEW NXG?|author=William Wong|date=May 23, 2017|website=[[Electronic Design (magazine)|Electronic Design]]}}</ref><ref>{{cite web | url=https://www.ni.com/en/support/documentation/supplemental/10/ni-labview-compiler--under-the-hood.html | title=NI LabVIEW Compiler: Under the Hood }}</ref> [[Lua (programming language)|Lua]], [[Objective-C]], [[OpenCL]],<ref>{{cite news
|last = Larabel |first = Michael
|url = https://www.phoronix.com/scan.php?page=news_item&px=SPIRV-LLVM-Translator
|date = 11 April 2018
|title = Khronos Officially Announces Its LLVM/SPIR-V Translator
|url = https://www.phoronix.com/scan.php?page=news_item&px=SPIRV-LLVM-Translator
|date = 11 April 2018
|title = Khronos Officially Announces Its LLVM/SPIR-V Translator
|author = Michael Larabel
|publisher = phoronix.com
|work = Phoronix.com
}}</ref> [[PostgreSQL]]'s SQL and PLpgSQL,<ref>{{Cite web|date=2020-11-12|title=32.1. What is JIT compilation?|url=https://www.postgresql.org/docs/11/jit-reason.html|access-date=2021-01-25|website=PostgreSQL Documentation|language=en}}</ref> [[Ruby (programming language)|Ruby]],<ref>{{cite web|title=Features|url=http://www.rubymotion.com/tour/features/|website=RubyMotion|publisher=Scratchwork Development LLC|access-date=June 17, 2017|quote=[[RubyMotion]] transforms the Ruby source code of your project into ... machine code using a[n] ... ahead-of-time (AOT) compiler, based on LLVM.}}</ref> [[Rust (programming language)|Rust]],<ref>{{Cite web|url=https://rustc-dev-guide.rust-lang.org/backend/codegen.html|title=Code Generation - Guide to Rustc Development|website=rust-lang.org|access-date=2023-01-04}}</ref> [[Scala (programming language)|Scala]],<ref>{{Cite web|last=Reedy |first=Geoff |date=September 24, 2012 |title=Compiling Scala to LLVM |location=St. Louis, Missouri, United States |access-date=February 19, 2013 |url=http://www.infoq.com/presentations/Scala-LLVM}}</ref> [[Swift (programming language)|Swift]], [[Xojo]], and [[Zig (programming language)|Zig]].
}}</ref> [[PostgreSQL]]'s SQL and PLpgSQL,<ref>{{Cite web|date=2020-11-12|title=32.1. What is JIT compilation?|url=https://www.postgresql.org/docs/11/jit-reason.html|access-date=2021-01-25 |website=PostgreSQL Documentation|language=en}}</ref> [[Ruby (programming language)|Ruby]],<ref>{{cite web|title=Features|url=http://www.rubymotion.com/tour/features/|website=RubyMotion|publisher=Scratchwork Development LLC|access-date=June 17, 2017|quote=[[RubyMotion]] transforms the Ruby source code of your project into ... machine code using a[n] ... ahead-of-time (AOT) compiler, based on LLVM.}}</ref> [[Rust (programming language)|Rust]],<ref>{{Cite web|url=https://rustc-dev-guide.rust-lang.org/backend/codegen.html|title=Code Generation - Guide to Rustc Development|website=rust-lang.org|access-date=2023-01-04}}</ref> [[Scala (programming language)|Scala]],<ref>{{Cite web|last=Reedy |first=Geoff |date=September 24, 2012 |title=Compiling Scala to LLVM |location=St. Louis, Missouri, United States |access-date=February 19, 2013 |url=http://www.infoq.com/presentations/Scala-LLVM}}</ref><ref>{{cite web |title=Scala Native |url=https://scala-native.org/ |access-date=26 November 2023}}</ref> [[Standard ML]],<ref>{{cite web |title=LLVMCodegen |url=http://mlton.org/LLVMCodegen |website=MLton |access-date=26 November 2024}}</ref> [[Swift (programming language)|Swift]], [[Xojo]], and [[Zig (programming language)|Zig]].


==History==
==History==
The LLVM project started in 2000 at the [[University of Illinois at Urbana–Champaign]], under the direction of [[Vikram Adve]] and [[Chris Lattner]]. LLVM was originally developed as a research infrastructure to investigate [[dynamic compilation]] techniques for static and [[dynamic programming language|dynamic]] programming languages. LLVM was released under the [[University of Illinois/NCSA Open Source License]],<ref name="License"/> a [[permissive free software licence]]. In 2005, [[Apple Inc.]] hired Lattner and formed a team to work on the LLVM system for various uses within Apple's development systems.<ref name="Adam Treat">{{citation|url=http://lists.trolltech.com/qt4-preview-feedback/2005-02/msg00691.html |title=mkspecs and patches for LLVM compile of Qt4 |author=Adam Treat |date=February 19, 2005 |access-date=January 27, 2012 |url-status=dead |archive-url=https://web.archive.org/web/20111004073001/http://lists.trolltech.com/qt4-preview-feedback/2005-02/msg00691.html |archive-date= October 4, 2011 }}</ref> LLVM has been an integral part of Apple's [[Xcode]] development tools for [[macOS]] and [[iOS]] since Xcode 4.<ref name="Apple LLVM Compiler">{{cite web |url=https://developer.apple.com/technologies/tools/ |title=Developer Tools Overview |website=Apple Developer |publisher=Apple |archive-url=https://web.archive.org/web/20110423095129/https://developer.apple.com/technologies/tools/ |archive-date=April 23, 2011}}</ref>
The LLVM project started in 2000 at the [[University of Illinois at Urbana–Champaign]], under the direction of [[Vikram Adve]] and [[Chris Lattner]]. LLVM was originally developed as a research infrastructure to investigate [[dynamic compilation]] techniques for static and [[dynamic programming language|dynamic]] programming languages. LLVM was released under the [[University of Illinois/NCSA Open Source License]],<ref name="License"/> a [[permissive free software licence]]. In 2005, [[Apple Inc.]] hired Lattner and formed a team to work on the LLVM system for various uses within Apple's development systems.<ref name="Adam Treat">{{citation|url=http://lists.trolltech.com/qt4-preview-feedback/2005-02/msg00691.html |title=mkspecs and patches for LLVM compile of Qt4 |author=Adam Treat |date=February 19, 2005 |access-date=January 27, 2012 |url-status=dead |archive-url=https://web.archive.org/web/20111004073001/http://lists.trolltech.com/qt4-preview-feedback/2005-02/msg00691.html |archive-date= October 4, 2011}}</ref> LLVM has been an integral part of Apple's [[Xcode]] development tools for [[macOS]] and [[iOS]] since Xcode 4 in 2011.<ref name="Apple LLVM Compiler">{{cite web |url=https://developer.apple.com/technologies/tools/ |title=Developer Tools Overview |website=Apple Developer |publisher=Apple |archive-url=https://web.archive.org/web/20110423095129/https://developer.apple.com/technologies/tools/ |archive-date=April 23, 2011}}</ref>


In 2006, Lattner started working on a new project called [[Clang]]. The combination of Clang frontend and LLVM backend is called Clang/LLVM or simply Clang.
In 2006, Lattner started working on a new project named [[Clang]]. The combination of Clang frontend and LLVM backend is named Clang/LLVM or simply Clang.


The name ''LLVM'' was originally an [[initialism]] for ''Low Level Virtual Machine''. However, the LLVM project evolved into an umbrella project that has little relationship to what most current developers think of as a [[virtual machine]]. This made the initialism "confusing" and "inappropriate", and since 2011 LLVM is "officially no longer an acronym",<ref>{{cite mailing list |title=The name of LLVM |url=http://lists.llvm.org/pipermail/llvm-dev/2011-December/046445.html |first=Chris |last=Lattner |mailing-list=llvm-dev |date=December 21, 2011 |quote='LLVM' is officially no longer an acronym. The acronym it once expanded too was confusing, and inappropriate almost from day 1. :) As LLVM has grown to encompass other subprojects, it became even less useful and meaningless. |access-date=March 2, 2016}}</ref> but a brand that applies to the LLVM umbrella project.<ref>{{cite book |last1=Lattner |first1=Chris |editor1-last=Brown |editor1-first=Amy |editor2-last=Wilson |editor2-first=Greg |title=The architecture of open source applications |date=1 June 2011 |isbn=978-1257638017 |chapter-url=https://www.aosabook.org/en/llvm.html |chapter=LLVM|quote=The name 'LLVM' was once an acronym, but is now just a brand for the umbrella project.}}</ref> The project encompasses the LLVM [[intermediate representation]] (IR), the LLVM [[debugger]], the LLVM implementation of the [[C++ Standard Library]] (with full support of [[C++11]] and [[C++14]]<ref>{{cite web|url=http://libcxx.llvm.org/|title="libc++" C++ Standard Library}}</ref>), etc. LLVM is administered by the LLVM Foundation. Compiler engineer Tanya Lattner became its president in 2014<ref>{{cite web |url=http://blog.llvm.org/2014/04/the-llvm-foundation.html |title=The LLVM Foundation |work=LLVM Project Blog |date=April 3, 2014 |author=Chris Lattner}}</ref> and was in post {{As of|2022|lc=y}}.<ref>{{cite web | title=Board of Directors | website=LLVM Foundation | date=11 November 2022 | url=https://foundation.llvm.org/docs/board/}}</ref>
The name ''LLVM'' was originally an [[initialism]] for ''Low Level Virtual Machine''. However, the LLVM project evolved into an umbrella project that has little relationship to what most current developers think of as a [[virtual machine]]. This made the initialism "confusing" and "inappropriate", and since 2011 LLVM is "officially no longer an acronym",<ref>{{cite mailing list |title=The name of LLVM |url=http://lists.llvm.org/pipermail/llvm-dev/2011-December/046445.html |last=Lattner |first=Chris |author-link=Chris Lattner |mailing-list=llvm-dev |date=December 21, 2011 |quote='LLVM' is officially no longer an acronym. The acronym it once expanded too was confusing, and inappropriate almost from day 1. :) As LLVM has grown to encompass other subprojects, it became even less useful and meaningless. |access-date=March 2, 2016}}</ref> but a brand that applies to the LLVM umbrella project.<ref>{{cite book |last1=Lattner |first1=Chris |editor1-last=Brown |editor1-first=Amy |editor2-last=Wilson |editor2-first=Greg |title=The architecture of open source applications |date=1 June 2011 |isbn=978-1257638017 |chapter-url=https://www.aosabook.org/en/llvm.html |chapter=LLVM|publisher=Lulu.com |quote=The name 'LLVM' was once an acronym, but is now just a brand for the umbrella project.}}</ref> The project encompasses the LLVM [[intermediate representation]] (IR), the LLVM [[debugger]], the LLVM implementation of the [[C++ Standard Library]] (with full support of [[C++11]] and [[C++14]]<ref>{{cite web|url=http://libcxx.llvm.org/|title="libc++" C++ Standard Library}}</ref>), etc. LLVM is administered by the LLVM Foundation. Compiler engineer Tanya Lattner became its president in 2014<ref>{{cite web |url=http://blog.llvm.org/2014/04/the-llvm-foundation.html |title=The LLVM Foundation |last=Lattner |first=Chris |author-link=Chris Lattner |date=April 3, 2014 |work=LLVM Project Blog}}</ref> and was in post {{As of|2024|March|lc=y}}.<ref>{{cite web |title=Board of Directors |url=https://foundation.llvm.org/docs/board/ |access-date=19 March 2024 |website=LLVM Foundation}}</ref>


''"For designing and implementing LLVM"'', the [[Association for Computing Machinery]] presented Vikram Adve, Chris Lattner, and [[Evan Cheng]] with the 2012 [[ACM Software System Award]].<ref>{{cite web |url=https://awards.acm.org/software-system/award-winners?year=2012&award=149&region=&submit=Submit&isSpecialCategory= |title=ACM Software System Award |publisher=ACM}}</ref>
''"For designing and implementing LLVM"'', the [[Association for Computing Machinery]] presented Vikram Adve, Chris Lattner, and [[Evan Cheng]] with the 2012 [[ACM Software System Award]].<ref>{{cite web |url=https://awards.acm.org/software-system/award-winners?year=2012&award=149&region=&submit=Submit&isSpecialCategory= |title=ACM Software System Award |publisher=ACM}}</ref>


The project was originally available under the [[UIUC license]]. After v9.0.0 released in 2019,<ref>{{cite web |last1=Wennborg |first1=Hans |title=[llvm-announce] LLVM 9.0.0 Release |url=https://lists.llvm.org/pipermail/llvm-announce/2019-September/000085.html |date=19 September 2019}}</ref> LLVM relicensed to the [[Apache License 2.0]] with LLVM Exceptions.<ref name="License" /> {{As of|2022|11|}} about 400 contributions had not been relicensed.<ref>{{cite web |title=Relicensing Long Tail |url=https://foundation.llvm.org/docs/relicensing_long_tail/ |website=foundation.llvm.org|date=11 November 2022}}</ref><ref>{{Cite web |title=LLVM relicensing - long tail |publisher=LLVM Project |via=Google Docs |date= |access-date=27 November 2022 |url= https://docs.google.com/spreadsheets/d/18_0Hog_eSwES8lKwf7WJal3yBwwcYfvPu1yCfZnTcek/edit#gid=975215793}}</ref>
The project was originally available under the [[UIUC license]]. After v9.0.0 released in 2019,<ref>{{cite web |last1=Wennborg |first1=Hans |title=[llvm-announce] LLVM 9.0.0 Release |url=https://lists.llvm.org/pipermail/llvm-announce/2019-September/000085.html |date=19 September 2019}}</ref> LLVM relicensed to the [[Apache License 2.0]] with LLVM Exceptions.<ref name="License"/> {{As of|2022|11|}} about 400 contributions had not been relicensed.<ref>{{cite web |title=Relicensing Long Tail |url=https://foundation.llvm.org/docs/relicensing_long_tail/ |website=foundation.llvm.org|date=11 November 2022}}</ref><ref>{{Cite web |title=LLVM relicensing - long tail |publisher=LLVM Project |via=Google Docs |date= |access-date=27 November 2022 |url= https://docs.google.com/spreadsheets/d/18_0Hog_eSwES8lKwf7WJal3yBwwcYfvPu1yCfZnTcek/edit#gid=975215793}}</ref>


==Features==
==Features==
LLVM can provide the middle layers of a complete compiler system, taking [[intermediate representation]] (IR) code from a [[compiler]] and emitting an optimized IR. This new IR can then be converted and linked into machine-dependent [[assembly language]] code for a target platform. LLVM can accept the IR from the [[GNU Compiler Collection]] (GCC) [[toolchain]], allowing it to be used with a wide array of existing compiler front-ends written for that project. LLVM can also be built with gcc after version 7.5.<ref>{{Cite web |title=⚙ D156286 [docs] Bump minimum GCC version to 7.5 |url=https://reviews.llvm.org/D156286 |access-date=2023-07-28 |website=reviews.llvm.org}}</ref>
LLVM can provide the middle layers of a complete compiler system, taking [[intermediate representation]] (IR) code from a [[compiler]] and emitting an optimized IR. This new IR can then be converted and linked into machine-dependent [[assembly language]] code for a target platform. LLVM can accept the IR from the [[GNU Compiler Collection]] (GCC) [[toolchain]], allowing it to be used with a wide array of extant compiler front-ends written for that project. LLVM can also be built with gcc after version 7.5.<ref>{{Cite web |title=⚙ D156286 [docs] Bump minimum GCC version to 7.5 |url=https://reviews.llvm.org/D156286 |access-date=2023-07-28 |website=reviews.llvm.org}}</ref>


LLVM can also generate [[Relocation (computing)|relocatable machine code]] at compile-time or link-time or even binary machine code at run-time.
LLVM can also generate [[Relocation (computing)|relocatable machine code]] at compile-time or link-time or even binary machine code at runtime.


LLVM supports a language-independent [[instruction set]] and [[type system]].<ref name="langref"/> Each instruction is in [[static single assignment form]] (SSA), meaning that each [[variable (programming)|variable]] (called a typed register) is assigned once and then frozen. This helps simplify the analysis of dependencies among variables. LLVM allows code to be compiled statically, as it is under the traditional GCC system, or left for late-compiling from the IR to machine code via [[just-in-time compilation]] (JIT), similar to [[Java (programming language)|Java]]. The type system consists of basic types such as [[integer (computer science)|integer]] or [[floating-point arithmetic|floating-point]] numbers and five [[Composite data type|derived types]]: [[pointer (computer programming)|pointers]], [[array data structure|arrays]], [[array data type|vectors]], [[record (computer science)|structures]], and [[function (programming)|functions]]. A type construct in a concrete language can be represented by combining these basic types in LLVM. For example, a class in C++ can be represented by a mix of structures, functions and arrays of [[function pointer]]s.
LLVM supports a language-independent [[instruction set]] and [[type system]].<ref name="langref"/> Each instruction is in [[static single assignment form]] (SSA), meaning that each [[variable (programming)|variable]] (called a typed register) is assigned once and then frozen. This helps simplify the analysis of dependencies among variables. LLVM allows code to be compiled statically, as it is under the traditional GCC system, or left for late-compiling from the IR to machine code via [[just-in-time compilation]] (JIT), similar to [[Java (programming language)|Java]]. The type system consists of basic types such as [[integer (computer science)|integer]] or [[floating-point arithmetic|floating-point]] numbers and five [[Composite data type|derived types]]: [[pointer (computer programming)|pointers]], [[array data structure|arrays]], [[array data type|vectors]], [[record (computer science)|structures]], and [[function (programming)|functions]]. A type construct in a concrete language can be represented by combining these basic types in LLVM. For example, a class in C++ can be represented by a mix of structures, functions and arrays of [[function pointer]]s.


The LLVM JIT compiler can optimize unneeded static branches out of a program at runtime, and thus is useful for [[partial evaluation]] in cases where a program has many options, most of which can easily be determined unneeded in a specific environment. This feature is used in the [[OpenGL]] pipeline of [[Mac OS X Leopard]] (v10.5) to provide support for missing hardware features.<ref>{{cite mailing list
The LLVM JIT compiler can optimize unneeded static branches out of a program at runtime, and thus is useful for [[partial evaluation]] in cases where a program has many options, most of which can easily be determined unneeded in a specific environment. This feature is used in the [[OpenGL]] pipeline of [[Mac OS X Leopard]] (v10.5) to provide support for missing hardware features.<ref>{{cite mailing list
| last = Lattner |first = Chris |author-link=Chris Lattner
| url = http://lists.llvm.org/pipermail/llvm-dev/2006-August/006497.html
| date = August 15, 2006
| title = A cool use of LLVM at Apple: the OpenGL stack
| url = http://lists.llvm.org/pipermail/llvm-dev/2006-August/006497.html
| author = Chris Lattner
| date = August 15, 2006
| title = A cool use of LLVM at Apple: the OpenGL stack
| mailing-list = llvm-dev
| mailing-list = llvm-dev
| access-date = March 1, 2016}}</ref>
| access-date = March 1, 2016}}</ref>


Graphics code within the OpenGL stack can be left in intermediate representation and then compiled when run on the target machine. On systems with high-end [[graphics processing unit]]s (GPUs), the resulting code remains quite thin, passing the instructions on to the GPU with minimal changes. On systems with low-end GPUs, LLVM will compile optional procedures that run on the local [[central processing unit]] (CPU) that emulate instructions that the GPU cannot run internally. LLVM improved performance on low-end machines using [[Intel GMA]] chipsets. A similar system was developed under the [[Gallium3D]] LLVMpipe, and incorporated into the [[GNOME]] shell to allow it to run without a proper 3D hardware driver loaded.<ref>Michael Larabel, [https://www.phoronix.com/scan.php?page=news_item&px=MTAxMjI "GNOME Shell Works Without GPU Driver Support"], ''phoronix'', November 6, 2011</ref>
Graphics code within the OpenGL stack can be left in intermediate representation and then compiled when run on the target machine. On systems with high-end [[graphics processing unit]]s (GPUs), the resulting code remains quite thin, passing the instructions on to the GPU with minimal changes. On systems with low-end GPUs, LLVM will compile optional procedures that run on the local [[central processing unit]] (CPU) that emulate instructions that the GPU cannot run internally. LLVM improved performance on low-end machines using [[Intel GMA]] chipsets. A similar system was developed under the [[Gallium3D]] LLVMpipe, and incorporated into the [[GNOME]] shell to allow it to run without a proper 3D hardware driver loaded.<ref>Michael Larabel, [https://www.phoronix.com/scan.php?page=news_item&px=MTAxMjI "GNOME Shell Works Without GPU Driver Support"], ''phoronix'', November 6, 2011</ref>


In 2011, programs compiled by GCC were outperforming those from LLVM by 10%, on average.<ref>{{cite web
In 2011, programs compiled by GCC outperformed those from LLVM by 10%, on average.<ref>{{cite web
| url = http://vmakarov.fedorapeople.org/spec/2011/llvmgcc32.html
| last = Makarov |first = V.
| url = http://vmakarov.fedorapeople.org/spec/2011/llvmgcc32.html
| title = SPEC2000: Comparison of LLVM-2.9 and GCC4.6.1 on x86
| author = V. Makarov
| title = SPEC2000: Comparison of LLVM-2.9 and GCC4.6.1 on x86
| access-date = October 3, 2011}}</ref><ref>{{cite web
| access-date = October 3, 2011}}</ref><ref>{{cite web
| url = http://vmakarov.fedorapeople.org/spec/2011/llvmgcc64.html
| last = Makarov |first = V.
| url = http://vmakarov.fedorapeople.org/spec/2011/llvmgcc64.html
| title = SPEC2000: Comparison of LLVM-2.9 and GCC4.6.1 on x86_64
| author = V. Makarov
| title = SPEC2000: Comparison of LLVM-2.9 and GCC4.6.1 on x86_64
| access-date = October 3, 2011}}</ref>
| access-date = October 3, 2011}}</ref>
In 2013, [[Phoronix_Test_Suite#Phoronix_website| phoronix]] reported that LLVM had caught up with GCC, compiling binaries of approximately equal performance.<ref>{{cite web
In 2013, [[Phoronix Test Suite#Phoronix website|phoronix]] reported that LLVM had caught up with GCC, compiling binaries of approximately equal performance.<ref>{{cite web
| last = Larabel |first = Michael
| url = https://www.phoronix.com/scan.php?page=article&item=llvm_clang32_final
| date = December 27, 2012
| author = Michael Larabel
| url = https://www.phoronix.com/scan.php?page=article&item=llvm_clang32_final
| title = LLVM/Clang 3.2 Compiler Competing With GCC
| title = LLVM/Clang 3.2 Compiler Competing With GCC
| date = December 27, 2012
| access-date = March 31, 2013}}</ref>
| access-date = March 31, 2013}}</ref>


Line 76: Line 79:


===Frontends===
===Frontends===
LLVM was originally written to be a replacement for the existing [[Code generation (compiler)|code generator]] in the GCC stack,<ref>{{cite conference | first=Chris | last=Lattner | author-link=Chris Lattner | author2=Vikram Adve | title=Architecture For a Next-Generation GCC | url=http://llvm.org/pubs/2003-05-01-GCCSummit2003.html | conference=First Annual GCC Developers' Summit | date=May 2003 | access-date=September 6, 2009}}</ref> and many of the GCC frontends have been modified to work with it, resulting in the now-defunct LLVM-GCC suite. The modifications generally involve a [[GIMPLE]]-to-LLVM IR step so that LLVM optimizers and codegen can be used instead of GCC's GIMPLE system. Apple was a significant user of LLVM-GCC through [[Xcode]] 4.x (2013).<ref>{{cite web |title=LLVM Compiler Overview |url=https://developer.apple.com/library/archive/documentation/CompilerTools/Conceptual/LLVMCompilerOverview/index.html |website=developer.apple.com}}</ref><ref>{{cite web|url=https://developer.apple.com/library/archive/documentation/Xcode/Conceptual/RN-Xcode-Archive/Chapters/xc5_release_notes.html|title=Xcode 5 Release Notes|work=Apple Inc.}}</ref> This use of the GCC frontend was considered mostly a temporary measure, but with the advent of [[Clang]] and advantages of LLVM and Clang's modern and modular codebase (as well as compilation speed), is mostly obsolete.
LLVM was originally written to be a replacement for the extant [[Code generation (compiler)|code generator]] in the GCC stack,<ref>{{cite conference |last1=Lattner |first1=Chris |author1-link=Chris Lattner |last2=Adve |first2=Vikram |author2-link=Vikram Adve |title=Architecture For a Next-Generation GCC |url=http://llvm.org/pubs/2003-05-01-GCCSummit2003.html |conference=First Annual GCC Developers' Summit |date=May 2003 |access-date=September 6, 2009}}</ref> and many of the GCC frontends have been modified to work with it, resulting in the now-defunct LLVM-GCC suite. The modifications generally involve a [[GIMPLE]]-to-LLVM IR step so that LLVM optimizers and codegen can be used instead of GCC's GIMPLE system. Apple was a significant user of LLVM-GCC through [[Xcode]] 4.x (2013).<ref>{{cite web |title=LLVM Compiler Overview |url=https://developer.apple.com/library/archive/documentation/CompilerTools/Conceptual/LLVMCompilerOverview/index.html |website=developer.apple.com}}</ref><ref>{{cite web|url=https://developer.apple.com/library/archive/documentation/Xcode/Conceptual/RN-Xcode-Archive/Chapters/xc5_release_notes.html|title=Xcode 5 Release Notes|work=Apple Inc.}}</ref> This use of the GCC frontend was considered mostly a temporary measure, but with the advent of [[Clang]] and advantages of LLVM and Clang's modern and modular codebase (as well as compilation speed), is mostly obsolete.


LLVM currently{{as of?|date=March 2023}} supports compiling of [[Ada (programming language)|Ada]], [[C (programming language)|C]], [[C++]], [[D (programming language)|D]], [[Delphi (programming language)|Delphi]], [[Fortran]], [[Haskell (programming language)|Haskell]], [[Julia (programming language)|Julia]], [[Objective-C]], [[Rust (programming language)|Rust]], and [[Swift (programming language)|Swift]] using various [[Semantic analysis (compilers)|frontends]].
LLVM currently{{as of?|date=March 2023}} supports compiling of [[Ada (programming language)|Ada]], [[C (programming language)|C]], [[C++]], [[D (programming language)|D]], [[Delphi (software)|Delphi]], [[Fortran]], [[Haskell]], [[Julia (programming language)|Julia]], [[Objective-C]], [[Rust (programming language)|Rust]], and [[Swift (programming language)|Swift]] using various [[Semantic analysis (compilers)|frontends]].


Widespread interest in LLVM has led to several efforts to develop new frontends for a variety of languages. The one that has received the most attention is Clang, a new compiler supporting C, C++, and Objective-C. Primarily supported by Apple, Clang is aimed at replacing the C/Objective-C compiler in the GCC system with a system that is more easily integrated with [[integrated development environment]]s (IDEs) and has wider support for [[thread (computer science)|multithreading]]. Support for [[OpenMP]] directives has been included in [[Clang]] since release 3.8.<ref>{{cite web
Widespread interest in LLVM has led to several efforts to develop new frontends for many languages. The one that has received the most attention is Clang, a newer compiler supporting C, C++, and Objective-C. Primarily supported by Apple, Clang is aimed at replacing the C/Objective-C compiler in the GCC system with a system that is more easily integrated with [[integrated development environment]]s (IDEs) and has wider support for [[Thread (computing)|multithreading]]. Support for [[OpenMP]] directives has been included in [[Clang]] since release 3.8.<ref>{{cite web
| url = http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html#openmp-support-in-clan
| url = http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html#openmp-support-in-clan
| title = Clang 3.8 Release Notes
| title = Clang 3.8 Release Notes
| access-date = August 24, 2016}}</ref>
| access-date = August 24, 2016}}</ref>


The Utrecht [[Haskell (programming language)|Haskell]] compiler can generate code for LLVM. Though the generator is in the early stages of development, in many cases it has been more efficient than the C code generator.<ref>{{cite web
The [[Utrecht University|Utrecht]] [[Haskell]] compiler can generate code for LLVM. While the generator was in early stages of development, in many cases it was more efficient than the C code generator.<ref>{{cite web
| url = http://www.cs.uu.nl/wiki/bin/view/Stc/CompilingHaskellToLLVM
| url = http://www.cs.uu.nl/wiki/bin/view/Stc/CompilingHaskellToLLVM
| title = Compiling Haskell To LLVM
| title = Compiling Haskell To LLVM
| access-date = February 22, 2009}}</ref> There is a [[Glasgow Haskell Compiler]] (GHC) backend using LLVM that achieves a 30% speed-up of the compiled code relative to native code compiling via GHC or C code generation followed by compiling, missing only one of the many optimizing techniques implemented by the GHC.<ref>{{cite web
| access-date = February 22, 2009}}</ref> The [[Glasgow Haskell Compiler]] (GHC) backend uses LLVM and achieves a 30% speed-up of compiled code relative to native code compiling via GHC or C code generation followed by compiling, missing only one of the many optimizing techniques implemented by the GHC.<ref>{{cite web
| url = http://blog.llvm.org/2010/05/glasgow-haskell-compiler-and-llvm.html
| url = http://blog.llvm.org/2010/05/glasgow-haskell-compiler-and-llvm.html
| title = LLVM Project Blog: The Glasgow Haskell Compiler and LLVM
| title = LLVM Project Blog: The Glasgow Haskell Compiler and LLVM
| date = May 17, 2010
| date = May 17, 2010
| access-date = August 13, 2010}}</ref>
| access-date = August 13, 2010}}</ref>
Line 99: Line 102:
[[File:Mesa layers of crap 2016.svg|thumb|LLVM IR is used e.g., by radeonsi and by llvmpipe. Both are part of [[Mesa 3D]].]]
[[File:Mesa layers of crap 2016.svg|thumb|LLVM IR is used e.g., by radeonsi and by llvmpipe. Both are part of [[Mesa 3D]].]]


The core of LLVM is the [[intermediate representation]] (IR), a low-level programming language similar to assembly. IR is a strongly typed [[reduced instruction set computer]] (RISC) instruction set which abstracts away most details of the target. For example, the calling convention is abstracted through <code>call</code> and <code>ret</code> instructions with explicit arguments. Also, instead of a fixed set of registers, IR uses an infinite set of temporaries of the form %0, %1, etc. LLVM supports three equivalent forms of IR: a human-readable assembly format,<ref name=IRref>{{cite web |url=https://llvm.org/docs/LangRef.html |title=LLVM Language Reference Manual |author=<!-- Unstated staff writers --> |date=10 January 2023 |website=LLVM.org}}</ref> an in-memory format suitable for frontends, and a dense bitcode format for serializing. A simple [["Hello, world!" program]] in the IR format:
The core of LLVM is the [[intermediate representation]] (IR), a low-level programming language similar to assembly. IR is a strongly typed [[reduced instruction set computer]] (RISC) instruction set which abstracts away most details of the target. For example, the calling convention is abstracted through <code>call</code> and <code>ret</code> instructions with explicit arguments. Also, instead of a fixed set of registers, IR uses an infinite set of temporaries of the form %0, %1, etc. LLVM supports three equivalent forms of IR: a human-readable assembly format,<ref name=IRref>{{cite web |url=https://llvm.org/docs/LangRef.html |title=LLVM Language Reference Manual |author=<!-- Unstated staff writers --> |date=10 January 2023 |website=LLVM.org}}</ref> an in-memory format suitable for frontends, and a dense bitcode format for serializing. A simple [["Hello, world!" program]] in the human-readable IR format:


<syntaxhighlight lang="llvm">
<syntaxhighlight lang="llvm">
Line 116: Line 119:
The many different conventions used and features provided by different targets mean that LLVM cannot truly produce a target-independent IR and retarget it without breaking some established rules. Examples of target dependence beyond what is explicitly mentioned in the documentation can be found in a 2011 proposal for "wordcode", a fully target-independent variant of LLVM IR intended for online distribution.<ref>{{cite web |last1=Kang |first1=Jin-Gu |title=Wordcode: more target independent LLVM bitcode |url=https://llvm.org/devmtg/2011-09-16/EuroLLVM2011-MoreTargetIndependentLLVMBitcode.pdf |access-date=1 December 2019}}</ref> A more practical example is [[PNaCl]].<ref>{{cite web|url=http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf |title=PNaCl: Portable Native Client Executables |access-date=25 April 2012 |url-status=dead |archive-url=https://web.archive.org/web/20120502135033/http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf |archive-date=2 May 2012 |df=dmy-all}}</ref>
The many different conventions used and features provided by different targets mean that LLVM cannot truly produce a target-independent IR and retarget it without breaking some established rules. Examples of target dependence beyond what is explicitly mentioned in the documentation can be found in a 2011 proposal for "wordcode", a fully target-independent variant of LLVM IR intended for online distribution.<ref>{{cite web |last1=Kang |first1=Jin-Gu |title=Wordcode: more target independent LLVM bitcode |url=https://llvm.org/devmtg/2011-09-16/EuroLLVM2011-MoreTargetIndependentLLVMBitcode.pdf |access-date=1 December 2019}}</ref> A more practical example is [[PNaCl]].<ref>{{cite web|url=http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf |title=PNaCl: Portable Native Client Executables |access-date=25 April 2012 |url-status=dead |archive-url=https://web.archive.org/web/20120502135033/http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf |archive-date=2 May 2012 |df=dmy-all}}</ref>


The LLVM project also introduces another type of intermediate representation named [[MLIR (software)|MLIR]]<ref>{{Cite web |title=MLIR |url=https://mlir.llvm.org/ |access-date=2022-06-07 |website=mlir.llvm.org}}</ref> which helps build reusable and extensible compiler infrastructure by employing a plugin architecture named Dialect.<ref>{{Cite web |title=Dialects - MLIR |url=https://mlir.llvm.org/docs/Dialects/ |access-date=2022-06-07 |website=mlir.llvm.org}}</ref> It enables the use of higher-level information on the program structure in the process of optimization including polyhedral compilation.
The LLVM project also introduces another type of intermediate representation named [[MLIR (software)|MLIR]]<ref>{{Cite web |title=MLIR |url=https://mlir.llvm.org/ |access-date=2022-06-07 |website=mlir.llvm.org}}</ref> which helps build reusable and extensible compiler infrastructure by employing a plugin architecture named Dialect.<ref>{{Cite web |title=Dialects - MLIR |url=https://mlir.llvm.org/docs/Dialects/ |access-date=2022-06-07 |website=mlir.llvm.org}}</ref> It enables the use of higher-level information on the program structure in the process of optimization including [[Polytope model|polyhedral compilation]].


===Backends===
===Backends===
At version 16, LLVM supports many [[instruction set]]s, including [[IA-32]], [[x86-64]], [[ARM architecture|ARM]], [[Qualcomm Hexagon]], [[Loongson#LoongArch|LoongArch]], [[Motorola 68000|M68K]], [[MIPS architecture|MIPS]], [[Nvidia|NVIDIA]] [[Parallel Thread Execution]] (PTX, also called ''NVPTX'' in LLVM documentation), [[PowerPC]], [[TeraScale (microarchitecture)|AMD TeraScale]],<ref>{{cite mailing list |url=http://lists.llvm.org/pipermail/llvm-dev/2012-March/048409.html |title=[LLVMdev] RFC: R600, a new backend for AMD GPUs |mailing-list=llvm-dev |first=Tom |last=Stellard |date=March 26, 2012}}</ref> most [[Advanced Micro Devices|AMD]] GPU recent ones (also called ''AMDGPU'' in LLVM documentation),<ref>{{cite web | url=https://llvm.org/docs/AMDGPUUsage.html | title=User Guide for AMDGPU Backend — LLVM 15.0.0git documentation }}</ref> [[SPARC]], [[z/Architecture]] (also called ''SystemZ'' in LLVM documentation), and [[XCore]].
At version 16, LLVM supports many [[instruction set]]s, including [[IA-32]], [[x86-64]], [[ARM architecture|ARM]], [[Qualcomm Hexagon]], [[Loongson#LoongArch|LoongArch]], [[Motorola 68000|M68K]], [[MIPS architecture|MIPS]], [[Nvidia|NVIDIA]] [[Parallel Thread Execution]] (PTX, also named ''NVPTX'' in LLVM documentation), [[PowerPC]], [[TeraScale (microarchitecture)|AMD TeraScale]],<ref>{{cite mailing list |url=http://lists.llvm.org/pipermail/llvm-dev/2012-March/048409.html |title=[LLVMdev] RFC: R600, a new backend for AMD GPUs |mailing-list=llvm-dev |first=Tom |last=Stellard |date=March 26, 2012}}</ref> most recent [[Advanced Micro Devices|AMD]] GPUs (also named ''AMDGPU'' in LLVM documentation),<ref>{{cite web |url=https://llvm.org/docs/AMDGPUUsage.html |title=User Guide for AMDGPU Backend — LLVM 15.0.0git documentation}}</ref> [[SPARC]], [[z/Architecture]] (also named ''SystemZ'' in LLVM documentation), and [[XCore]].


Some features are not available on some platforms. Most features are present for IA-32, x86-64, z/Architecture, ARM, and PowerPC.<ref>[http://llvm.org/docs/CodeGenerator.html#target-feature-matrix Target-specific Implementation Notes: Target Feature Matrix] // The LLVM Target-Independent Code Generator, LLVM site.</ref> [[RISC-V]] is supported as of version 7.
Some features are not available on some platforms. Most features are present for IA-32, x86-64, z/Architecture, ARM, and PowerPC.<ref>[http://llvm.org/docs/CodeGenerator.html#target-feature-matrix Target-specific Implementation Notes: Target Feature Matrix] // The LLVM Target-Independent Code Generator, LLVM site.</ref> [[RISC-V]] is supported as of version 7.


In the past, LLVM also supported other backends, fully or partially, including C backend, [[Cell (microprocessor)|Cell SPU]], [[MicroBlaze|mblaze (MicroBlaze)]],<ref>{{cite web | title=Remove the mblaze backend from llvm | website=GitHub | date=July 25, 2013 | url=https://github.com/llvm/llvm-project/commit/729866670b05108c399221ca3908400d94ef9783 | access-date=January 26, 2020}}</ref> AMD R600, DEC/Compaq [[DEC Alpha|Alpha]] ([[Alpha AXP]])<ref>{{cite web | title=Remove the Alpha backend. | website=GitHub | date=October 27, 2011 | url=https://github.com/llvm/llvm-project/commit/4c9fca99c9a6734bb33c34aeaf40b71c4002757e | access-date=January 26, 2020}}</ref> and [[Nios II|Nios2]],<ref name=" llvm 2019">{{cite web | title=&#91;Nios2&#93; Remove Nios2 backend | website=GitHub | date=January 15, 2019 | url=https://github.com/llvm/llvm-project/commit/99fcbf67d04d488d819bffb8fda3bb9d5504b63b | access-date=January 26, 2020}}</ref> but that hardware is mostly obsolete, and LLVM developers decided the support and maintenance costs were no longer justified.{{citation needed|date=December 2021}}
In the past, LLVM also supported other backends, fully or partially, including C backend, [[Cell (microprocessor)|Cell SPU]], [[MicroBlaze|mblaze (MicroBlaze)]],<ref>{{cite web |title=Remove the mblaze backend from llvm |website=GitHub |date=July 25, 2013 |url=https://github.com/llvm/llvm-project/commit/729866670b05108c399221ca3908400d94ef9783 |access-date=January 26, 2020}}</ref> AMD R600, DEC/Compaq [[DEC Alpha|Alpha]] ([[Alpha AXP]])<ref>{{cite web |title=Remove the Alpha backend. |website=GitHub |date=October 27, 2011 |url=https://github.com/llvm/llvm-project/commit/4c9fca99c9a6734bb33c34aeaf40b71c4002757e |access-date=January 26, 2020}}</ref> and [[Nios II|Nios2]],<ref name=" llvm 2019">{{cite web |title=&#91;Nios2&#93; Remove Nios2 backend |website=GitHub |date=January 15, 2019 |url=https://github.com/llvm/llvm-project/commit/99fcbf67d04d488d819bffb8fda3bb9d5504b63b |access-date=January 26, 2020}}</ref> but that hardware is mostly obsolete, and LLVM developers decided the support and maintenance costs were no longer justified.{{citation needed|date=December 2021}}


LLVM also supports [[WebAssembly]] as a target, enabling compiled programs to execute in WebAssembly-enabled environments such as [[Google Chrome]] / [[Chromium (web browser)|Chromium]], [[Firefox]], [[Microsoft Edge]], [[Apple Safari]] or [[WAVM (virtual machine)|WAVM]]. LLVM-compliant WebAssembly compilers typically support mostly unmodified source code written in C, C++, D, Rust, Nim, Kotlin and several other languages.
LLVM also supports [[WebAssembly]] as a target, enabling compiled programs to execute in WebAssembly-enabled environments such as [[Google Chrome]] / [[Chromium (web browser)|Chromium]], [[Firefox]], [[Microsoft Edge]], [[Apple Safari]] or [[WAVM (virtual machine)|WAVM]]. LLVM-compliant WebAssembly compilers typically support mostly unmodified source code written in C, C++, D, Rust, Nim, Kotlin and several other languages.
Line 135: Line 138:


===C++ Standard Library===
===C++ Standard Library===
The LLVM project includes an implementation of the [[C++ Standard Library]] called libc++, dual-licensed under the [[MIT License]] and the [[UIUC license]].<ref>{{cite web|url=http://libcxx.llvm.org|title="libc++" C++ Standard Library}}</ref>
The LLVM project includes an implementation of the [[C++ Standard Library]] named libc++, dual-licensed under the [[MIT License]] and the [[UIUC license]].<ref>{{cite web|url=http://libcxx.llvm.org|title="libc++" C++ Standard Library}}</ref>


Since v9.0.0, it was relicensed to the [[Apache License 2.0]] with LLVM Exceptions.<ref name="License" />
Since v9.0.0, it was relicensed to the [[Apache License 2.0]] with LLVM Exceptions.<ref name="License"/>


===Polly===
===Polly===
Line 146: Line 149:


===C Standard Library===
===C Standard Library===

llvm-libc is an incomplete, upcoming, ABI independent [[C standard library]] designed by and for the LLVM project.<ref>{{Cite web |title=llvm-libc: An ISO C-conformant Standard Library — libc 15.0.0git documentation |url=https://libc.llvm.org/ |access-date=2022-07-18 |website=libc.llvm.org}}</ref>
llvm-libc is an incomplete, upcoming, ABI independent [[C standard library]] designed by and for the LLVM project.<ref>{{Cite web |title=llvm-libc: An ISO C-conformant Standard Library — libc 15.0.0git documentation |url=https://libc.llvm.org/ |access-date=2022-07-18 |website=libc.llvm.org}}</ref>


Line 153: Line 155:
* AMD's [[AMD Optimizing C/C++ Compiler]] is based on LLVM, Clang, and Flang.
* AMD's [[AMD Optimizing C/C++ Compiler]] is based on LLVM, Clang, and Flang.
* Apple maintains an open-source fork for [[Xcode]].<ref>{{cite web |title=apple/llvm-project |url=https://github.com/apple/llvm-project |publisher=Apple |date=5 September 2020}}</ref>
* Apple maintains an open-source fork for [[Xcode]].<ref>{{cite web |title=apple/llvm-project |url=https://github.com/apple/llvm-project |publisher=Apple |date=5 September 2020}}</ref>
* [[ARM architecture|ARM]] maintains a fork of LLVM 9 as the "Arm Compiler".
* [[ARM architecture|Arm]] provides a number of LLVM based toolchains, including Arm Compiler for Embedded targeting bare-metal development and Arm Compiler for Linux targeting the High Performance Computing market
* [[Flang]], Fortran project in development {{As of|2022|lc=y}}
* [[Flang]], Fortran project in development {{As of|2022|lc=y}}
* [[IBM]] is adopting LLVM in its [[IBM XL C/C++ Compilers|C/C++]] and [[IBM XL Fortran|Fortran]] compilers.<ref>{{cite web |url=https://developer.ibm.com/blogs/c-and-fortran-adopt-llvm-open-source/ |title=IBM C/C++ and Fortran compilers to adopt LLVM open source infrastructure}}</ref>
* [[IBM]] is adopting LLVM in its [[IBM XL C/C++ Compilers|C/C++]] and [[IBM XL Fortran|Fortran]] compilers.<ref>{{cite web |url=https://developer.ibm.com/blogs/c-and-fortran-adopt-llvm-open-source/ |title=IBM C/C++ and Fortran compilers to adopt LLVM open source infrastructure|date=July 29, 2022 }}</ref>
* [[Intel]] has adopted LLVM for their next generation [[Intel C++ Compiler]].<ref>{{Cite web|title=Intel C/C++ compilers complete adoption of LLVM|url=https://www.intel.com/content/www/us/en/develop/blogs/adoption-of-llvm-complete-icx.html|access-date=2021-08-17|website=Intel|language=en}}</ref>
* [[Intel]] has adopted LLVM for their next generation [[Intel C++ Compiler]].<ref>{{Cite web |title=Intel C/C++ compilers complete adoption of LLVM |url=https://www.intel.com/content/www/us/en/develop/blogs/adoption-of-llvm-complete-icx.html |access-date=2021-08-17 |website=Intel |language=en}}</ref>
* The [[Los Alamos National Laboratory]] has a parallel-computing fork of LLVM 8 called "Kitsune".<ref>{{cite web |title=lanl/kitsune |url=https://github.com/lanl/kitsune |publisher=Los Alamos National Laboratory |date=27 February 2020}}</ref>
* The [[Los Alamos National Laboratory]] has a parallel-computing fork of LLVM 8 named "Kitsune".<ref>{{cite web |title=lanl/kitsune |url=https://github.com/lanl/kitsune |publisher=Los Alamos National Laboratory |date=27 February 2020}}</ref>
* [[Nvidia]] uses LLVM in the implementation of its NVVM [[CUDA]] Compiler.<ref>{{cite web|title=NVVM IR Specification 1.5|url=https://docs.nvidia.com/cuda/nvvm-ir-spec/index.html|quote=The current NVVM IR is based on LLVM 5.0}}</ref> The NVVM compiler is distinct from the "NVPTX" backend mentioned in the [[#Back_ends|Backends section]], although both generate PTX code for Nvidia GPUs.
* [[Nvidia]] uses LLVM in the implementation of its NVVM [[CUDA]] Compiler.<ref>{{cite web|title=NVVM IR Specification 1.5|url=https://docs.nvidia.com/cuda/nvvm-ir-spec/index.html|quote=The current NVVM IR is based on LLVM 5.0}}</ref> The NVVM compiler is distinct from the "NVPTX" backend mentioned in the [[#Backends|Backends section]], although both generate PTX code for Nvidia GPUs.
* Since 2013{{as of?|date=March 2023}}, Sony has been using LLVM's primary front-end Clang compiler in the [[software development kit]] (SDK) of its [[PlayStation 4]] console.<ref>{{citation |url=http://llvm.org/devmtg/2013-11/slides/Robinson-PS4Toolchain.pdf |title=Developer Toolchain for ps4 |access-date=February 24, 2015}}</ref>
* Since 2013, Sony has been using LLVM's primary front-end Clang compiler in the [[software development kit]] (SDK) of its [[PlayStation 4]] console.<ref>{{citation |url=http://llvm.org/devmtg/2013-11/slides/Robinson-PS4Toolchain.pdf |title=Developer Toolchain for ps4 |access-date=February 24, 2015}}</ref>


==See also==
==See also==
{{Portal|Free and open-source software}}
{{Portal|Free and open-source software}}

* [[Common Intermediate Language]]
* [[Common Intermediate Language]]
* [[HHVM]]
* [[HHVM]]
Line 184: Line 185:
==Literature==
==Literature==
* [[Chris Lattner]] - ''[http://www.aosabook.org/en/llvm.html The Architecture of Open Source Applications - Chapter 11 LLVM]'', {{ISBN|978-1257638017}}, released 2012 under [[CC BY]] 3.0 ([[Open Access]]).<ref name="aosa">{{cite book
* [[Chris Lattner]] - ''[http://www.aosabook.org/en/llvm.html The Architecture of Open Source Applications - Chapter 11 LLVM]'', {{ISBN|978-1257638017}}, released 2012 under [[CC BY]] 3.0 ([[Open Access]]).<ref name="aosa">{{cite book
| last = Lattner |first = Chris |author-link=Chris Lattner
| title = The Architecture of Open Source Applications
| date = March 15, 2012
| title = The Architecture of Open Source Applications
| publisher = Amy Brown, Greg Wilson
| publisher = Amy Brown, Greg Wilson
| chapter = Chapter 11
| chapter = Chapter 11
| author = Chris Lattner
| isbn = 978-1257638017
| chapter-url = http://www.aosabook.org/en/llvm.html
| date = March 15, 2012
}}</ref>
| isbn = 978-1257638017
| chapter-url = http://www.aosabook.org/en/llvm.html| author-link = Chris Lattner
}}</ref>
* [http://llvm.org/pubs/2004-01-30-CGO-LLVM.pdf LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation], a published paper by Chris Lattner, Vikram Adve
* [http://llvm.org/pubs/2004-01-30-CGO-LLVM.pdf LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation], a published paper by Chris Lattner, Vikram Adve


Line 202: Line 203:
{{Use mdy dates|date=October 2018}}
{{Use mdy dates|date=October 2018}}


[[Category:Compilers]]
[[Category:Free and open source compilers]]
[[Category:Free compilers and interpreters]]
[[Category:Register-based virtual machines]]
[[Category:Register-based virtual machines]]
[[Category:Software using the NCSA license]]
[[Category:Software using the NCSA license]]

Latest revision as of 05:06, 28 November 2024

LLVM
Original author(s)Chris Lattner, Vikram Adve
Developer(s)LLVM Developer Group
Initial release2003; 21 years ago (2003)
Stable release
19.1.4[2] Edit this on Wikidata / 19 November 2024
Repository
Written inC++
Operating systemCross-platform
TypeCompiler
LicenseApache License 2.0 with LLVM Exceptions (v9.0.0 or later)[3]
Legacy license:[4] UIUC (BSD-style)
Websitewww.llvm.org

LLVM is a set of compiler and toolchain technologies[5] that can be used to develop a frontend for any programming language and a backend for any instruction set architecture. LLVM is designed around a language-independent intermediate representation (IR) that serves as a portable, high-level assembly language that can be optimized with a variety of transformations over multiple passes.[6] The name LLVM originally stood for Low Level Virtual Machine, though the project has expanded and the name is no longer officially an initialism.

LLVM is written in C++ and is designed for compile-time, link-time, runtime, and "idle-time" optimization. Originally implemented for C and C++, the language-agnostic design of LLVM has since spawned a wide variety of frontends: languages with compilers that use LLVM (or which do not directly use LLVM but can generate compiled programs as LLVM IR) include ActionScript, Ada, C# for .NET,[7][8][9] Common Lisp, PicoLisp, Crystal, CUDA, D, Delphi,[10] Dylan, Forth,[11] Fortran, FreeBASIC, Free Pascal, Halide, Haskell, Idris,[12] Java bytecode, Julia, Kotlin, LabVIEW's G language,[13][14] Lua, Objective-C, OpenCL,[15] PostgreSQL's SQL and PLpgSQL,[16] Ruby,[17] Rust,[18] Scala,[19][20] Standard ML,[21] Swift, Xojo, and Zig.

History

[edit]

The LLVM project started in 2000 at the University of Illinois at Urbana–Champaign, under the direction of Vikram Adve and Chris Lattner. LLVM was originally developed as a research infrastructure to investigate dynamic compilation techniques for static and dynamic programming languages. LLVM was released under the University of Illinois/NCSA Open Source License,[3] a permissive free software licence. In 2005, Apple Inc. hired Lattner and formed a team to work on the LLVM system for various uses within Apple's development systems.[22] LLVM has been an integral part of Apple's Xcode development tools for macOS and iOS since Xcode 4 in 2011.[23]

In 2006, Lattner started working on a new project named Clang. The combination of Clang frontend and LLVM backend is named Clang/LLVM or simply Clang.

The name LLVM was originally an initialism for Low Level Virtual Machine. However, the LLVM project evolved into an umbrella project that has little relationship to what most current developers think of as a virtual machine. This made the initialism "confusing" and "inappropriate", and since 2011 LLVM is "officially no longer an acronym",[24] but a brand that applies to the LLVM umbrella project.[25] The project encompasses the LLVM intermediate representation (IR), the LLVM debugger, the LLVM implementation of the C++ Standard Library (with full support of C++11 and C++14[26]), etc. LLVM is administered by the LLVM Foundation. Compiler engineer Tanya Lattner became its president in 2014[27] and was in post as of March 2024.[28]

"For designing and implementing LLVM", the Association for Computing Machinery presented Vikram Adve, Chris Lattner, and Evan Cheng with the 2012 ACM Software System Award.[29]

The project was originally available under the UIUC license. After v9.0.0 released in 2019,[30] LLVM relicensed to the Apache License 2.0 with LLVM Exceptions.[3] As of November 2022 about 400 contributions had not been relicensed.[31][32]

Features

[edit]

LLVM can provide the middle layers of a complete compiler system, taking intermediate representation (IR) code from a compiler and emitting an optimized IR. This new IR can then be converted and linked into machine-dependent assembly language code for a target platform. LLVM can accept the IR from the GNU Compiler Collection (GCC) toolchain, allowing it to be used with a wide array of extant compiler front-ends written for that project. LLVM can also be built with gcc after version 7.5.[33]

LLVM can also generate relocatable machine code at compile-time or link-time or even binary machine code at runtime.

LLVM supports a language-independent instruction set and type system.[6] Each instruction is in static single assignment form (SSA), meaning that each variable (called a typed register) is assigned once and then frozen. This helps simplify the analysis of dependencies among variables. LLVM allows code to be compiled statically, as it is under the traditional GCC system, or left for late-compiling from the IR to machine code via just-in-time compilation (JIT), similar to Java. The type system consists of basic types such as integer or floating-point numbers and five derived types: pointers, arrays, vectors, structures, and functions. A type construct in a concrete language can be represented by combining these basic types in LLVM. For example, a class in C++ can be represented by a mix of structures, functions and arrays of function pointers.

The LLVM JIT compiler can optimize unneeded static branches out of a program at runtime, and thus is useful for partial evaluation in cases where a program has many options, most of which can easily be determined unneeded in a specific environment. This feature is used in the OpenGL pipeline of Mac OS X Leopard (v10.5) to provide support for missing hardware features.[34]

Graphics code within the OpenGL stack can be left in intermediate representation and then compiled when run on the target machine. On systems with high-end graphics processing units (GPUs), the resulting code remains quite thin, passing the instructions on to the GPU with minimal changes. On systems with low-end GPUs, LLVM will compile optional procedures that run on the local central processing unit (CPU) that emulate instructions that the GPU cannot run internally. LLVM improved performance on low-end machines using Intel GMA chipsets. A similar system was developed under the Gallium3D LLVMpipe, and incorporated into the GNOME shell to allow it to run without a proper 3D hardware driver loaded.[35]

In 2011, programs compiled by GCC outperformed those from LLVM by 10%, on average.[36][37] In 2013, phoronix reported that LLVM had caught up with GCC, compiling binaries of approximately equal performance.[38]

Components

[edit]

LLVM has become an umbrella project containing multiple components.

Frontends

[edit]

LLVM was originally written to be a replacement for the extant code generator in the GCC stack,[39] and many of the GCC frontends have been modified to work with it, resulting in the now-defunct LLVM-GCC suite. The modifications generally involve a GIMPLE-to-LLVM IR step so that LLVM optimizers and codegen can be used instead of GCC's GIMPLE system. Apple was a significant user of LLVM-GCC through Xcode 4.x (2013).[40][41] This use of the GCC frontend was considered mostly a temporary measure, but with the advent of Clang and advantages of LLVM and Clang's modern and modular codebase (as well as compilation speed), is mostly obsolete.

LLVM currently[as of?] supports compiling of Ada, C, C++, D, Delphi, Fortran, Haskell, Julia, Objective-C, Rust, and Swift using various frontends.

Widespread interest in LLVM has led to several efforts to develop new frontends for many languages. The one that has received the most attention is Clang, a newer compiler supporting C, C++, and Objective-C. Primarily supported by Apple, Clang is aimed at replacing the C/Objective-C compiler in the GCC system with a system that is more easily integrated with integrated development environments (IDEs) and has wider support for multithreading. Support for OpenMP directives has been included in Clang since release 3.8.[42]

The Utrecht Haskell compiler can generate code for LLVM. While the generator was in early stages of development, in many cases it was more efficient than the C code generator.[43] The Glasgow Haskell Compiler (GHC) backend uses LLVM and achieves a 30% speed-up of compiled code relative to native code compiling via GHC or C code generation followed by compiling, missing only one of the many optimizing techniques implemented by the GHC.[44]

Many other components are in various stages of development, including, but not limited to, the Rust compiler, a Java bytecode frontend, a Common Intermediate Language (CIL) frontend, the MacRuby implementation of Ruby 1.9, various frontends for Standard ML, and a new graph coloring register allocator.[citation needed]

Intermediate representation

[edit]
LLVM IR is used e.g., by radeonsi and by llvmpipe. Both are part of Mesa 3D.

The core of LLVM is the intermediate representation (IR), a low-level programming language similar to assembly. IR is a strongly typed reduced instruction set computer (RISC) instruction set which abstracts away most details of the target. For example, the calling convention is abstracted through call and ret instructions with explicit arguments. Also, instead of a fixed set of registers, IR uses an infinite set of temporaries of the form %0, %1, etc. LLVM supports three equivalent forms of IR: a human-readable assembly format,[45] an in-memory format suitable for frontends, and a dense bitcode format for serializing. A simple "Hello, world!" program in the human-readable IR format:

@.str = internal constant [14 x i8] c"Hello, world\0A\00"

declare i32 @printf(ptr, ...)

define i32 @main(i32 %argc, ptr %argv) nounwind {
entry:
    %tmp1 = getelementptr [14 x i8], ptr @.str, i32 0, i32 0
    %tmp2 = call i32 (ptr, ...) @printf( ptr %tmp1 ) nounwind
    ret i32 0
}

The many different conventions used and features provided by different targets mean that LLVM cannot truly produce a target-independent IR and retarget it without breaking some established rules. Examples of target dependence beyond what is explicitly mentioned in the documentation can be found in a 2011 proposal for "wordcode", a fully target-independent variant of LLVM IR intended for online distribution.[46] A more practical example is PNaCl.[47]

The LLVM project also introduces another type of intermediate representation named MLIR[48] which helps build reusable and extensible compiler infrastructure by employing a plugin architecture named Dialect.[49] It enables the use of higher-level information on the program structure in the process of optimization including polyhedral compilation.

Backends

[edit]

At version 16, LLVM supports many instruction sets, including IA-32, x86-64, ARM, Qualcomm Hexagon, LoongArch, M68K, MIPS, NVIDIA Parallel Thread Execution (PTX, also named NVPTX in LLVM documentation), PowerPC, AMD TeraScale,[50] most recent AMD GPUs (also named AMDGPU in LLVM documentation),[51] SPARC, z/Architecture (also named SystemZ in LLVM documentation), and XCore.

Some features are not available on some platforms. Most features are present for IA-32, x86-64, z/Architecture, ARM, and PowerPC.[52] RISC-V is supported as of version 7.

In the past, LLVM also supported other backends, fully or partially, including C backend, Cell SPU, mblaze (MicroBlaze),[53] AMD R600, DEC/Compaq Alpha (Alpha AXP)[54] and Nios2,[55] but that hardware is mostly obsolete, and LLVM developers decided the support and maintenance costs were no longer justified.[citation needed]

LLVM also supports WebAssembly as a target, enabling compiled programs to execute in WebAssembly-enabled environments such as Google Chrome / Chromium, Firefox, Microsoft Edge, Apple Safari or WAVM. LLVM-compliant WebAssembly compilers typically support mostly unmodified source code written in C, C++, D, Rust, Nim, Kotlin and several other languages.

The LLVM machine code (MC) subproject is LLVM's framework for translating machine instructions between textual forms and machine code. Formerly, LLVM relied on the system assembler, or one provided by a toolchain, to translate assembly into machine code. LLVM MC's integrated assembler supports most LLVM targets, including IA-32, x86-64, ARM, and ARM64. For some targets, including the various MIPS instruction sets, integrated assembly support is usable but still in the beta stage.[citation needed]

Linker

[edit]

The lld subproject is an attempt to develop a built-in, platform-independent linker for LLVM.[56] lld aims to remove dependence on a third-party linker. As of May 2017, lld supports ELF, PE/COFF, Mach-O, and WebAssembly[57] in descending order of completeness. lld is faster than both flavors of GNU ld.[citation needed]

Unlike the GNU linkers, lld has built-in support for link-time optimization (LTO). This allows for faster code generation as it bypasses the use of a linker plugin, but on the other hand prohibits interoperability with other flavors of LTO.[58]

C++ Standard Library

[edit]

The LLVM project includes an implementation of the C++ Standard Library named libc++, dual-licensed under the MIT License and the UIUC license.[59]

Since v9.0.0, it was relicensed to the Apache License 2.0 with LLVM Exceptions.[3]

Polly

[edit]

This implements a suite of cache-locality optimizations as well as auto-parallelism and vectorization using a polyhedral model.[60]

Debugger

[edit]

C Standard Library

[edit]

llvm-libc is an incomplete, upcoming, ABI independent C standard library designed by and for the LLVM project.[61]

Derivatives

[edit]

Due to its permissive license, many vendors release their own tuned forks of LLVM. This is officially recognized by LLVM's documentation, which suggests against using version numbers in feature checks for this reason.[62] Some of the vendors include:

See also

[edit]

Literature

[edit]
  • Chris Lattner - The Architecture of Open Source Applications - Chapter 11 LLVM, ISBN 978-1257638017, released 2012 under CC BY 3.0 (Open Access).[69]
  • LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation, a published paper by Chris Lattner, Vikram Adve

References

[edit]
  1. ^ "LLVM Logo". The LLVM Compiler Infrastructure Project.
  2. ^ "LLVM 19.1.4". November 19, 2024. Retrieved November 20, 2024.
  3. ^ a b c d "LICENSE.TXT". llvm.org. Retrieved September 24, 2019.
  4. ^ "LLVM Developer Policy — LLVM 20.0.0git documentation". llvm.org. Retrieved November 9, 2024.
  5. ^ "The LLVM Compiler Infrastructure Project". Retrieved March 11, 2016.
  6. ^ a b "LLVM Language Reference Manual". Retrieved June 9, 2019.
  7. ^ "Announcing LLILC - A new LLVM-based Compiler for .NET". dotnetfoundation.org. Archived from the original on December 12, 2021. Retrieved September 12, 2020.
  8. ^ "Mono LLVM". Retrieved March 10, 2013.
  9. ^ Lattner, Chris (2011). "LLVM". In Brown, Amy; Wilson, Greg (eds.). The Architecture of Open Source Applications.
  10. ^ "LLVM-based Delphi Compilers". Embarcadero. Retrieved November 26, 2024.
  11. ^ "MovForth". GitHub. November 28, 2021.
  12. ^ "Rapid". Rapid. Retrieved November 22, 2024.
  13. ^ William Wong (May 23, 2017). "What's the Difference Between LabVIEW 2017 and LabVIEW NXG?". Electronic Design.
  14. ^ "NI LabVIEW Compiler: Under the Hood".
  15. ^ Larabel, Michael (April 11, 2018). "Khronos Officially Announces Its LLVM/SPIR-V Translator". Phoronix.com.
  16. ^ "32.1. What is JIT compilation?". PostgreSQL Documentation. November 12, 2020. Retrieved January 25, 2021.
  17. ^ "Features". RubyMotion. Scratchwork Development LLC. Retrieved June 17, 2017. RubyMotion transforms the Ruby source code of your project into ... machine code using a[n] ... ahead-of-time (AOT) compiler, based on LLVM.
  18. ^ "Code Generation - Guide to Rustc Development". rust-lang.org. Retrieved January 4, 2023.
  19. ^ Reedy, Geoff (September 24, 2012). "Compiling Scala to LLVM". St. Louis, Missouri, United States. Retrieved February 19, 2013.
  20. ^ "Scala Native". Retrieved November 26, 2023.
  21. ^ "LLVMCodegen". MLton. Retrieved November 26, 2024.
  22. ^ Adam Treat (February 19, 2005), mkspecs and patches for LLVM compile of Qt4, archived from the original on October 4, 2011, retrieved January 27, 2012
  23. ^ "Developer Tools Overview". Apple Developer. Apple. Archived from the original on April 23, 2011.
  24. ^ Lattner, Chris (December 21, 2011). "The name of LLVM". llvm-dev (Mailing list). Retrieved March 2, 2016. 'LLVM' is officially no longer an acronym. The acronym it once expanded too was confusing, and inappropriate almost from day 1. :) As LLVM has grown to encompass other subprojects, it became even less useful and meaningless.
  25. ^ Lattner, Chris (June 1, 2011). "LLVM". In Brown, Amy; Wilson, Greg (eds.). The architecture of open source applications. Lulu.com. ISBN 978-1257638017. The name 'LLVM' was once an acronym, but is now just a brand for the umbrella project.
  26. ^ ""libc++" C++ Standard Library".
  27. ^ Lattner, Chris (April 3, 2014). "The LLVM Foundation". LLVM Project Blog.
  28. ^ "Board of Directors". LLVM Foundation. Retrieved March 19, 2024.
  29. ^ "ACM Software System Award". ACM.
  30. ^ Wennborg, Hans (September 19, 2019). "[llvm-announce] LLVM 9.0.0 Release".
  31. ^ "Relicensing Long Tail". foundation.llvm.org. November 11, 2022.
  32. ^ "LLVM relicensing - long tail". LLVM Project. Retrieved November 27, 2022 – via Google Docs.
  33. ^ "⚙ D156286 [docs] Bump minimum GCC version to 7.5". reviews.llvm.org. Retrieved July 28, 2023.
  34. ^ Lattner, Chris (August 15, 2006). "A cool use of LLVM at Apple: the OpenGL stack". llvm-dev (Mailing list). Retrieved March 1, 2016.
  35. ^ Michael Larabel, "GNOME Shell Works Without GPU Driver Support", phoronix, November 6, 2011
  36. ^ Makarov, V. "SPEC2000: Comparison of LLVM-2.9 and GCC4.6.1 on x86". Retrieved October 3, 2011.
  37. ^ Makarov, V. "SPEC2000: Comparison of LLVM-2.9 and GCC4.6.1 on x86_64". Retrieved October 3, 2011.
  38. ^ Larabel, Michael (December 27, 2012). "LLVM/Clang 3.2 Compiler Competing With GCC". Retrieved March 31, 2013.
  39. ^ Lattner, Chris; Adve, Vikram (May 2003). Architecture For a Next-Generation GCC. First Annual GCC Developers' Summit. Retrieved September 6, 2009.
  40. ^ "LLVM Compiler Overview". developer.apple.com.
  41. ^ "Xcode 5 Release Notes". Apple Inc.
  42. ^ "Clang 3.8 Release Notes". Retrieved August 24, 2016.
  43. ^ "Compiling Haskell To LLVM". Retrieved February 22, 2009.
  44. ^ "LLVM Project Blog: The Glasgow Haskell Compiler and LLVM". May 17, 2010. Retrieved August 13, 2010.
  45. ^ "LLVM Language Reference Manual". LLVM.org. January 10, 2023.
  46. ^ Kang, Jin-Gu. "Wordcode: more target independent LLVM bitcode" (PDF). Retrieved December 1, 2019.
  47. ^ "PNaCl: Portable Native Client Executables" (PDF). Archived from the original (PDF) on 2 May 2012. Retrieved 25 April 2012.
  48. ^ "MLIR". mlir.llvm.org. Retrieved June 7, 2022.
  49. ^ "Dialects - MLIR". mlir.llvm.org. Retrieved June 7, 2022.
  50. ^ Stellard, Tom (March 26, 2012). "[LLVMdev] RFC: R600, a new backend for AMD GPUs". llvm-dev (Mailing list).
  51. ^ "User Guide for AMDGPU Backend — LLVM 15.0.0git documentation".
  52. ^ Target-specific Implementation Notes: Target Feature Matrix // The LLVM Target-Independent Code Generator, LLVM site.
  53. ^ "Remove the mblaze backend from llvm". GitHub. July 25, 2013. Retrieved January 26, 2020.
  54. ^ "Remove the Alpha backend". GitHub. October 27, 2011. Retrieved January 26, 2020.
  55. ^ "[Nios2] Remove Nios2 backend". GitHub. January 15, 2019. Retrieved January 26, 2020.
  56. ^ "lld - The LLVM Linker". The LLVM Project. Retrieved May 10, 2017.
  57. ^ "WebAssembly lld port".
  58. ^ "42446 – lld can't handle gcc LTO files". bugs.llvm.org.
  59. ^ ""libc++" C++ Standard Library".
  60. ^ "Polly - Polyhedral optimizations for LLVM".
  61. ^ "llvm-libc: An ISO C-conformant Standard Library — libc 15.0.0git documentation". libc.llvm.org. Retrieved July 18, 2022.
  62. ^ "Clang Language Extensions". Clang 12 documentation. Note that marketing version numbers should not be used to check for language features, as different vendors use different numbering schemes. Instead, use the Feature Checking Macros.
  63. ^ "apple/llvm-project". Apple. September 5, 2020.
  64. ^ "IBM C/C++ and Fortran compilers to adopt LLVM open source infrastructure". July 29, 2022.
  65. ^ "Intel C/C++ compilers complete adoption of LLVM". Intel. Retrieved August 17, 2021.
  66. ^ "lanl/kitsune". Los Alamos National Laboratory. February 27, 2020.
  67. ^ "NVVM IR Specification 1.5". The current NVVM IR is based on LLVM 5.0
  68. ^ Developer Toolchain for ps4 (PDF), retrieved February 24, 2015
  69. ^ Lattner, Chris (March 15, 2012). "Chapter 11". The Architecture of Open Source Applications. Amy Brown, Greg Wilson. ISBN 978-1257638017.
[edit]