SUPPORT THE WORK

GetWiki

LLVM

ARTICLE SUBJECTS
aesthetics  →
being  →
complexity  →
database  →
enterprise  →
ethics  →
fiction  →
history  →
internet  →
knowledge  →
language  →
licensing  →
linux  →
logic  →
method  →
news  →
perception  →
philosophy  →
policy  →
purpose  →
religion  →
science  →
sociology  →
software  →
truth  →
unix  →
wiki  →
ARTICLE TYPES
essay  →
feed  →
help  →
system  →
wiki  →
ARTICLE ORIGINS
critical  →
discussion  →
forked  →
imported  →
original  →
LLVM
[ temporary import ]
please note:
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
{{lead too short|date=September 2018}}







factoids
| programming language = C++| operating system = Cross-platform| genre = CompilerUniversity of Illinois/NCSA Open Source License{{citation >url=http://llvm.org/docs/FAQ.html#license work=LLVM: Frequently Asked Questions accessdate=January 27, 2012}}llvm.org}}}}The LLVM compiler infrastructure project is a "collection of modular and reusable compiler and toolchain technologies"WEB, The LLVM Compiler Infrastructure Project, March 11, 2016,weblink used to develop compiler front ends and back ends.LLVM is written in C++ and is designed for compile-time, link-time, run-time, and "idle-time" optimization of programs written in arbitrary programming languages. Originally implemented for C and C++, the language-agnostic design of LLVM has since spawned a wide variety of front ends: languages with compilers that use LLVM include ActionScript, Ada, C#,{{citation |title= Announcing LLILC - A new LLVM-based Compiler for .NET |accessdate= April 17, 2015 |url=weblink}}{{citation |title= Mono LLVM |accessdate= March 10, 2013 |url=weblink}}BOOK, The Architecture of Open Source Applications,weblink LLVM,weblink Chris Lattner, Amy Brown, Greg Wilson, 2011, Common Lisp, Crystal, CUDA, D, Delphi, Fortran, Graphical G Programming Language,WEB,weblink What’s the Difference Between LabVIEW 2017 and LabVIEW NXG?, William Wong, May 23, 2017, Electronic Design (magazine), Electronic Design, Halide, Haskell, Java bytecode, Julia, Kotlin, Lua, Objective-C, OpenGL Shading Language, Pony,WEB,weblink The LLVM Compiler Infrastructure Project, llvm.org, May 25, 2016, Python, R, Ruby,WEB, Features,weblink RubyMotion, Scratchwork Development LLC, 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., Rust, Scala,JOURNAL, Reedy, Geoff, Compiling Scala to LLVM, St. Louis, Missouri, United States, February 19, 2013, September 24, 2012,weblink Swift, and Xojo.

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 languages. LLVM was released under the University of Illinois/NCSA Open Source 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.{{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 |accessdate=January 27, 2012 |deadurl=yes |archiveurl=https://web.archive.org/web/20111004073001weblink |archivedate= October 4, 2011 |df= }} LLVM is an integral part of Apple's latest development tools for macOS and iOS.{{citation |url=https://developer.apple.com/technologies/tools/ |title=Apple LLVM Compiler |work=Developer Tools |publisher=Apple |accessdate=January 27, 2012}} Since 2013, Sony has been using LLVM's primary front end Clang compiler in the software development kit (SDK) of its PS4 console.{{citation |url=http://llvm.org/devmtg/2013-11/slides/Robinson-PS4Toolchain.pdf |title=Developer Toolchain for ps4 |accessdate=February 24, 2015}}The name LLVM was originally an initialism for Low Level Virtual Machine. This initialism has officially been removed to avoid confusion, as the LLVM has evolved into an umbrella project that has little relationship to what most current developers think of as virtual machines.MAILING LIST, The name of LLVM,weblink Chris, Lattner, llvm-dev, December 21, 2011, March 2, 2016, Now, LLVM is a brand that applies to the LLVM umbrella project, the LLVM intermediate representation (IR), the LLVM debugger, the LLVM implementation of the C++ Standard Library (with full support of C++11 and C++14WEB,weblink "libc++" C++ Standard Library, ), etc. LLVM is administered by the LLVM Foundation. Its president is compiler engineer Tanya Lattner.WEB,weblink The LLVM Foundation, LLVM Project Blog, April 3, 2014, Chris Lattner, "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.WEB,weblink ACM Software System Award, ACM,

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 extant compilers written for that project.LLVM can also generate relocatable machine code at compile-time or link-time or even binary machine code at run-time.LLVM supports a language-independent instruction set and type system.WEB
,weblink
, LLVM Language Reference Manual
, April 16, 2012
, 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.MAILING LIST
,weblink
, A cool use of LLVM at Apple: the OpenGL stack
, Chris Lattner
, August 15, 2006
, llvm-dev
, March 1, 2016
, 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.Michael Larabel, "GNOME Shell Works Without GPU Driver Support", phoronix, November 6, 2011For run-time performance of the compiled programs, GCC formerly outperformed LLVM by 10% on average in 2011.WEB
,weblink
, V. Makarov
, SPEC2000: Comparison of LLVM-2.9 and GCC4.6.1 on x86
, October 3, 2011
, WEB
,weblink
, V. Makarov
, SPEC2000: Comparison of LLVM-2.9 and GCC4.6.1 on x86_64
, October 3, 2011
, Newer results in 2013 indicate that LLVM has now caught up with GCC in this area, and is now compiling binaries of approximately equal performance.WEB
,weblink
, Michael Larabel
, LLVM/Clang 3.2 Compiler Competing With GCC
, December 27, 2012
, March 31, 2013
,

Components

LLVM has become an umbrella project containing multiple components.

Front ends

LLVM was originally written to be a replacement for the existing code generator in the GCC stack,CONFERENCE
, Chris
, Lattner
, Chris Lattner
, Vikram Adve
, Architecture For a Next-Generation GCC
,weblink
, First Annual GCC Developers' Summit
, May 2003
, September 6, 2009
, and many of the GCC front ends have been modified to work with it. LLVM currently supports compiling of Ada, C, C++, D, Delphi, Fortran, Haskell, Julia, Objective-C, Rust, and Swift using various front ends, some derived from version 4.0.1 and 4.2 of the GNU Compiler Collection (GCC).Widespread interest in LLVM has led to several efforts to develop new front ends 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 environments (IDEs) and has wider support for multithreading. Support for OpenMP directives has been included in Clang since release 3.8.WEB
,weblink
, Clang 3.8 Release Notes
, August 24, 2016
, The Utrecht 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.WEB
,weblink
, Compiling Haskell To LLVM
, February 22, 2009
, The Glasgow Haskell Compiler (GHC) has a working LLVM backend 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.WEB
,weblink
, LLVM Project Blog: The Glasgow Haskell Compiler and LLVM
, August 13, 2010
, Many other components are in various stages of development, including, but not limited to, the Rust compiler, a Java bytecode front end, a Common Intermediate Language (CIL) front end, the MacRuby implementation of Ruby 1.9, various front ends for Standard ML, and a new graph coloring register allocator.{{citation needed|date=June 2012}}

Intermediate representation

File:Mesa layers of crap 2016.svg|thumb|LLVM IR is used e.g., by radeonsi and by llvmpipe. Both are part of Mesa 3DMesa 3DThe core of LLVM is the intermediate representation (IR), a low-level programming language similar to assembly. IR is a strongly typed reduced instruction set computing (RISC) instruction set which abstracts away 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 isomorphic (i.e., functionally equivalent) forms of IR: a human-readable assembly format, a C++ object format suitable for frontends, and a dense bitcode format for serializing. A simple "Hello, world!" program in the assembly format:For the full documentation, refer to {{URLweblink}}.@.str = internal constant [14 x i8] c"hello, worldA0"declare i32 @printf(i8*, ...)define i32 @main(i32 %argc, i8** %argv) nounwind {entry:
%tmp1 = getelementptr [14 x i8], [14 x i8]* @.str, i32 0, i32 0
%tmp2 = call i32 (i8*, ...) @printf( i8* %tmp1 ) nounwind
ret i32 0
}

Back ends

At version 3.4, LLVM supports many instruction sets, including ARM, Qualcomm Hexagon, MIPS, Nvidia Parallel Thread Execution (PTX; called NVPTX in LLVM documentation), PowerPC, AMD TeraScale,MAILING LIST,weblink [LLVMdev] RFC: R600, a new backend for AMD GPUs, llvm-dev, Tom, Stellard, March 26, 2012, AMD Graphics Core Next (GCN), SPARC, z/Architecture (called SystemZ in LLVM documentation), x86, x86-64, and XCore. Some features are not available on some platforms. Most features are present for x86, x86-64, z/Architecture, ARM, and PowerPC.Target-specific Implementation Notes: Target Feature Matrix // The LLVM Target-Independent Code Generator, LLVM site. RISC-V is supported as of version 7.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 x86, 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.

Linker

The lld subproject is an attempt to develop a built-in, platform-independent linker for LLVM.WEB, lld - The LLVM Linker,weblink The LLVM Project, May 10, 2017, lld aims to remove dependence on a third-party linker. {{As of|2017|05}}, lld supports ELF, PE/COFF, and Mach-O in descending order of completeness. In cases where lld is insufficient, another linker such as GNU ld can be used.Using lld allows link-time optimization. When link-time optimization is enabled, the compiler generates LLVM bitcode instead of native code, and native code generation is done by the linker.

C++ Standard Library

The LLVM project includes an implementation of the C++ Standard Library, dual-licensed under the MIT License and the UIUC license.WEB,weblink "libc++" C++ Standard Library,

Debugger

Version history

{| class="wikitable collapsible collapsed"|7.0.1|December 21, 2018|7.0.0|September 19, 2018|6.0.0|March 8, 2018|5.0.1|December 19, 2017|5.0.0|September 7, 2017|4.0.1|July 4, 2017|4.0|March 13, 2017|3.9.1|December 23, 2016|3.9.0|September 2, 2016|3.8.1|July 11, 2016|3.8.0|March 8, 2016|3.7.1|January 5, 2016|3.7.0|September 1, 2015|3.6.2|July 16, 2015|3.6.1|May 26, 2015|3.6.0|February 27, 2015|3.5.2|April 2, 2015|3.5.1|January 20, 2015|3.5.0|September 3, 2014|3.4.2|June 19, 2014|3.4.1|May 7, 2014|3.4.0|January 2, 2014|3.3|June 17, 2013|3.2|December 20, 2012|3.1|May 22, 2012|3.0|December 1, 2011|2.9|April 6, 2011|2.8|October 5, 2010|2.7|April 27, 2010|2.6|October 23, 2009|2.5|March 2, 2009|2.4|November 9, 2008|2.3|June 9, 2008|2.2|February 11, 2008|2.1|September 26, 2007|2.0|May 23, 2007|1.9|November 19, 2006|1.8|August 9, 2006|1.7|April 20, 2006|1.6|November 8, 2005|1.5|May 18, 2005|1.4|December 9, 2004|1.3|August 13, 2004|1.2|March 19, 2004|1.1|December 17, 2003|1.0|October 24, 2003

See also

Literature

,

References

{{Reflist|30em}}

External links

  • {{Official website}}
{{FLOSS}}{{Use mdy dates|date=October 2018}}

- content above as imported from Wikipedia
- "LLVM" does not exist on GetWiki (yet)
- time: 10:49am EST - Sat, Feb 16 2019
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
GETWIKI 09 MAY 2016
GETWIKI 18 OCT 2015
M.R.M. Parrott
Biographies
GETWIKI 20 AUG 2014
GETWIKI 19 AUG 2014
GETWIKI 18 AUG 2014
Wikinfo
Culture
CONNECT