Releases: llvm-swift/LLVMSwift
0.8.0
LLVMSwift now tracks LLVM 11.0.
- Minimum tools versions have been bumped to LLVM 11.0 and Swift tools 5.2 (h/t @twof & @ThatsJustCheesy).
- Non-default
brewinstall locations are now supported by theutils/make-pkgconfig.swiftscript (h/t @eonil). DIBuildermethods now require explicitly-specified alignments. They previously defaulted to 0-alignment, which violates the DWARF standard.- A
sourceFilenamemay now be set on aModule. This value still defaults to the value ofname. (h/t @ColMcp) - In accordance with recent LLVM changes, alignments of 0 (the default) passed to
IRBuilder'sbuildAlloca,buildStore, andbuildLoadwill result in the target choosing a default alignment that is convenient and compatible with the type. This will impact output IR files, which previously left out default aligns altogether. - Per LLVM 10.0, unnamed function arguments now get printed with their automatically generated name (e.g. “i32 %0”) in IR function definitions.
DIBuilder.buildCompileUnitnow accepts parameters forsysRootandsdkRoot.- Fixed an issue where the
|=and<<=operators were inverted forSizetypes. - Fixed issues in the behavior of
Alignment.log2for zero-alignments and 64-bit results.
0.7.0
0.6.0
- LLVMSwift now enforces deployment target constraints. In the future, we will continue to update this constraint in line with the LLVM homebrew package.
- The
PassPipelineris now provided as an alternative toFunctionPassManager, which may crash if used in many common situations. Please migrate accordingly. - The
FunctionPassManageris now deprecated - Documentation for core components continues to improve
- An analog to LLVM’s infamous target
TripleAPI has been added. APIs that previously dealt with Strings have been updated accordingly - The bindings to ObjectFile were not correct and were not nearly feature-rich enough. The API has been completely overhauled
- The
IRInstructionprotocol has been added to unify instruction values around a common protocol. - Metadata can now be attached to instructions
- The debug location accessor now supports being reset to
nilwithout crashing - DIFile now exposes file metadata, and file metadata now exposes its source text, directory, and name
- The Metadata Builder facility (
MDBuilder) has been ported from LLVM - Additional bit-manipulation primitives for setting and clearing bits and getting leading and trailing 1’s counts have been added to
APInt - The labels on
FunctionType's initializer have been removed - The internalize pass has been added
- All SROA passes no longer differentiate between their parameters. They are now deprecated - SROA is available under with the unified
scalarReplacementOfAggregatespass
0.5.0
LLVMSwift now tracks LLVM 8.0
- Convenience bindings to common memory intrinsics (memcpy/memset/memmove) and pointer/integral casts have been added
- TargetData functions that used to take and return integers were deprecated last release. They are now removed. Please update to the corresponding functions using
SizeandAlignment. - More bindings to optimizer passes have been added
- Support for the JIT on Linux has been restored
- The value type of a global value is now accessible
- A new API for retrieving and attaching metadata to global values and instructions has been added.
- The new
APInttype provides arbitrary precision integral arithmetic that is compatible with LLVM values BasicBlockis nowEquatable
Intrinsics
LLVMSwift finally supports intrinsics! For more information, see Intrinsics.
0.4.1
- Convenience functions to insert the
llvm.dbg.declareandllvm.dbg.valueintrinsics have been added to theDIBuilder - Inline assembly builders have been improved. Notably, the choice of syntax is now customizable.
- Bindings for inserting and manipulating module-level debug information flags has been added.
- Bindings for a few missing optimization passes have been added
- A crash in the setter for a module's link name has been resolved (h/t @matthewseaman)
- All concrete instances of IRTypes are now equatable. Values of IRType may be compared directly but are not themselves
Equatable.
0.4.0
LLVMSwift now tracks LLVM 7.0
In addition to breaking a lot of APIs, our upgrade path to LLVM 7.0 coincides with the first removals of deprecated APIs in LLVMSwift. Without further ado
- LLVMSwift now supports Swift 4.2 and the Swift 4.2 tooling and package manager
cllvmhas been internalized to LLVMSwift. The separate repository has been archived and will no longer be maintained.- The
CallingConventionenumeration has drastically expanded - APIs for COMDAT support have been added
- The
IRConstantprotocol has been added, and all global values now conform to it. - The return type of APIs that return constants have been refined to use
IRConstantwhere possible - Constant GEP, sign extension, and bitcasting APIs have been aded
- Restrictions on function attributes have been completely lifted
- Documentation for
ThreadLocalModels has drastically expanded and is much more accurate UnnamedAddressnow supports local unnamed addresses- Routines for adding globals have been moved from
IRBuildertoModulewhere they belong StructTypenow includes accessors for its opacity and whether it was created with bitpacking or not.- The
SizeandAlignmentunit values have been added. Like clang'sCharUnits, they prevent bugs with mixed-unit arithmetic and make it convenient to work with byte-level calculations. - APIs that used to take and return integers now speak in terms of
SizeandAlignment. Notably,TargetData's functions that used to take and return integers now take and returnSizeandAlignment. The old forms are now deprecated - The
StructLayoutenum has been ported from LLVM to provide convenient access to the layout ofStructTypes. - Accessors for many more attributes of
TargetMachinehave been added. - The
Targets supported by aTargetMachineare now enumerable.
ORCJIT
LLVMSwift has migrated JIT to ORCJIT this release. To do so, we have completely removed and rewritten the old API. The ORCJIT will continue to evolve and stabilize over the next several LLVM releases.
Debug Information
Last but not least, LLVMSwift now includes a nearly feature-complete implementation of LLVM's debug information APIs. It's been a long time coming, but creating and attaching metadata to IRValues is now a reality!
0.3.0
0.2.3: Merge pull request #126 from kyouko-taiga/llvmattributeref-api
Support for the modern LLVM attribute API.
This is the last release of LLVMSwift that will fully support LLVM 5.0.
0.2.2: Merge pull request #125 from CodaFi/whats-up-doc
- Resolves an issue where MCJIT was not linked-into the calling process.
- Documentation fixes
- Additional constant operations to support load-time inert references
Fix SwiftPM Versioning
We saw some issues with SwiftPM versioning of this project's dependencies. They now track explicit versions instead of master, so we can avoid transitive dependency issues.