LLVM 11.0.0 releases: Low-Level Virtual Machine
LLVM is short for Low-Level Virtual Machine. This library provides compiler-related support and can be used as a background for multi-language compilers. It can be used in programming languages. Compilation optimization, link optimization, online compilation optimization, and code generation.
LLVM began as a research project at the University of Illinois, with the goal of providing a modern, SSA-based compilation strategy capable of supporting both static and dynamic compilation of arbitrary programming languages. Since then, LLVM has grown to be an umbrella project consisting of a number of subprojects, many of which are being used in production by a wide variety of commercial and open source projects as well as being widely used in academic research. Code in the LLVM project is licensed under the “UIUC” BSD-Style license.
LLVM 11.0.0 is released.
Changelog
- The callsite attribute vector-function-abi-variant has been added to describe the mapping between scalar functions and vector functions, to enable vectorization of call sites. The information provided by the attribute is interfaced via the API provided by the
VFDatabase
class. When scanning through the set of vector functions associated with a scalar call, the loop vectorizer now relies onVFDatabase
, instead ofTargetLibraryInfo
.- dereferenceable attributes and metadata on pointers no longer imply anything about the alignment of the pointer in question. Previously, some optimizations would make assumptions based on the type of the pointer. This behavior was undocumented. To preserve optimizations, frontends may need to be updated to generate appropriate align attributes and metadata.
- The DIModule metadata is extended to contain file and line number information. This information is used to represent Fortran modules debug info at IR level.
- LLVM IR now supports two distinct
llvm::FixedVectorType
andllvm::ScalableVectorType
vector types, both derived from the base classllvm::VectorType
. A number of algorithms dealing with IR vector types have been updated to make sure they work for both scalable and fixed vector types. Where possible, the code has been made generic to cover both cases using the base class. Specifically, places that were using the typeunsigned
to count the number of lanes of a vector are now usingllvm::ElementCount
. In places whereuint64_t
was used to denote the size in bits of a IR type we have partially migrated the codebase to usingllvm::TypeSize
.- Branching on
undef
/poison
is undefined behavior. It is needed for correctly analyzing value ranges based on branch conditions. This is consistent with MSan’s behavior as well.memset
/memcpy
/memmove
can takeundef
/poison
pointer(s) if the size to fill is zero.- Passing
undef
/poison
to a standard I/O library function call (printf/fputc/…) is undefined behavior. The newnoundef
attribute is attached to the functions’ arguments. The full list is available atllvm::inferLibFuncAttributes
.
- More…