This document contains the release notes for the LLVM Compiler Infrastructure, release 9.0.0. Here we describe the status of LLVM, including major improvements from the previous release, improvements in various subprojects of LLVM, and some of the current users of the code. All LLVM releases may be downloaded from the LLVM releases web site.
For more information about LLVM, including information about the latest release, please check out the main LLVM web site. If you have questions or comments, the LLVM Developer's Mailing List is a good place to send them.
These are issues that couldn't be fixed before the release. See the bug reports for the latest status.
EP_FullLinkTimeOptimizationLastare available for plugins to specialize the legacy pass manager full LTO pipeline.
llvm-objcopy/llvm-stripgot support for COFF object files/executables, supporting the most common copying/stripping options.
CLANG_ANALYZER_ENABLE_Z3_SOLVERhas been replaced by
LLVM will now remove stores to constant memory (since this is a contradiction) under the assumption the code in question must be dead. This has proven to be problematic for some C/C++ code bases which expect to be able to cast away 'const'. This is (and has always been) undefined behavior, but up until now had not been actively utilized for optimization purposes in this exact way. For more information, please see: bug 42763 and post commit discussion.
The optimizer will now convert calls to
memcmp into a calls to
bcmp in some circumstances. Users who are building freestanding code (not depending on the platform's libc) without specifying
-ffreestanding may need to either pass
-fno-builtin-bcmp, or provide a
LLVM will now pattern match wide scalar values stored by a succession of narrow stores. For example, Clang will compile the following function that writes a 32-bit value in big-endian order in a portable manner:
into the x86_64 code below:
(The corresponding read patterns have been matched since LLVM 5.)
LLVM will now omit range checks for jump tables when lowering switches with unreachable default destination. For example, the switch dispatch in the C++ code below
will result in the following x86_64 machine code when compiled with Clang. This is because falling off the end of a non-void function is undefined behaviour in C++, and the end of the function therefore being treated as unreachable:
LLVM can now sink similar instructions to a common successor block also when the instructions have no uses, such as calls to void functions. This allows code such as
to be optimized to a single call to
g, with the argument loaded from a lookup table.
immargparameter attribute. This indicates an intrinsic parameter is required to be a simple constant. This annotation must be accurate to avoid possible miscompiles.
@llvm.global_dtorshas been deleted. The third field of their element type is now mandatory. Specify i8* null to migrate from the obsoleted 2-field form.
byvalattribute can now take a type parameter:
byval(<ty>). If present it must be identical to the argument's pointee type. In the next release we intend to make this parameter mandatory in preparation for opaque pointer types.
atomicrmw xchgnow allows floating point types
oinline asm constraint.
-march=arch13option, the compiler will generate code making use of new instructions introduced with the vector enhancement facility 2 and the miscellaneous instruction extension facility 2. The
-mtune=arch13option enables arch13 specific instruction scheduling and tuning without making use of new instructions.
-mzvectoroption. Support for these builtins is indicated by the compiler predefining the
__VEC__macro to the value
The RISCV target is no longer "experimental"! It's now built by default, rather than needing to be enabled with
The backend has full codegen support for the RV32I and RV64I base RISC-V instruction set variants, with the MAFDC standard extensions. We support the hard and soft-float ABIs for these targets. Testing has been performed with both Linux and bare-metal targets, including the compilation of a large corpus of Linux applications (through buildroot).
lldb-miis shipped as part of LLDB. The tool will still be available in a downstream repository on GitHub.
Mull is an LLVM-based tool for mutation testing with a strong focus on C and C++ languages.
In addition to producing an easily portable open source OpenCL implementation, another major goal of pocl is improving performance portability of OpenCL programs with compiler optimizations, reducing the need for target-dependent manual optimizations. An important part of pocl is a set of LLVM passes used to statically parallelize multiple work-items with the kernel compiler, even in the presence of work-group barriers. This enables static parallelization of the fine-grained static concurrency in the work groups in multiple ways.
TCE is an open source toolset for designing customized processors based on the Transport Triggered Architecture (TTA). The toolset provides a complete co-design flow from C/C++ programs down to synthesizable VHDL/Verilog and parallel program binaries. Processor customization points include register files, function units, supported operations, and the interconnection network.
TCE uses Clang and LLVM for C/C++/OpenCL C language support, target independent optimizations and also for parts of code generation. It generates new LLVM-based code generators "on the fly" for the designed TTA processors and loads them in to the compiler backend as runtime libraries to avoid per-target recompilation of larger parts of the compiler chain.
Zig is a system programming language intended to be an alternative to C. It provides high level features such as generics, compile time function execution, and partial evaluation, while exposing low level LLVM IR features such as aliases and intrinsics. Zig uses Clang to provide automatic import of .h symbols, including inline functions and simple macros. Zig uses LLD combined with lazily building compiler-rt to provide out-of-the-box cross-compiling for all supported targets.
D is a language with C-like syntax and static typing. It pragmatically combines efficiency, control, and modeling power, with safety and programmer productivity. D supports powerful concepts like Compile-Time Function Execution (CTFE) and Template Meta-Programming, provides an innovative approach to concurrency and offers many classical paradigms.
LDC uses the frontend from the reference compiler combined with LLVM as backend to produce efficient native code. LDC targets x86/x86_64 systems like Linux, OS X, FreeBSD and Windows and also Linux on ARM and PowerPC (32/64 bit). Ports to other architectures are underway.
A wide variety of additional information is available on the LLVM web page, in particular in the documentation section. The web page also contains versions of the API documentation which is up-to-date with the Subversion version of the source code. You can access versions of these documents specific to this release by going into the
llvm/docs/ directory in the LLVM tree.
If you have any questions or comments about LLVM, please feel free to contact us via the mailing lists.