The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
LLVMSwift now tracks LLVM 11.0.
⚠️ Breaking Changes Ahead ⚠️
- Minimum tools versions have been bumped to LLVM 11.0 and Swift tools 5.2 (h/t @twof & @ThatsJustCheesy).
- Non-default `brew` install locations are now supported by the `utils/make-pkgconfig.swift` script (h/t @eonil).
- `DIBuilder` methods now require explicitly-specified alignments. They previously defaulted to 0-alignment, which violates the DWARF standard.
- A `sourceFilename` may now be set on a `Module`. This value still defaults to the value of `name`. (h/t @ColMcp)
- In accordance with recent LLVM changes, alignments of 0 (the default) passed to `IRBuilder`'s `buildAlloca`, `buildStore`, and `buildLoad` will 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.buildCompileUnit` now accepts parameters for `sysRoot` and `sdkRoot`.
- Fixed an issue where the `|=` and `<<=` operators were inverted for `Size` types.
- Fixed issues in the behavior of `Alignment.log2` for zero-alignments and 64-bit results.
LLVMSwift now tracks LLVM 9.
⚠️ Breaking Changes Ahead ⚠️
- LLVMSwift now enforces deployment target constraints. In the future, we will continue to update this constraint in line with the LLVM homebrew package.
- The `PassPipeliner` is now provided as an alternative to `FunctionPassManager`, which may crash if used in many common situations. Please migrate accordingly.
- The `FunctionPassManager` is now deprecated
- Documentation for core components continues to improve
- An analog to LLVM’s infamous target `Triple` API 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 `IRInstruction` protocol 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 `nil` without 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 `scalarReplacementOfAggregates` pass
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 `Size` and `Alignment`.
- 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 `APInt` type provides arbitrary precision integral arithmetic that is compatible with LLVM values
- `BasicBlock` is now `Equatable`
Intrinsics
=======
LLVMSwift finally supports intrinsics! For more information, see [Intrinsics](Sources/LLVM/Intrinsic.swift).
- Convenience functions to insert the `llvm.dbg.declare` and `llvm.dbg.value` intrinsics have been added to the `DIBuilder`
- 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`.
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
⚠️ Breaking Changes Ahead ⚠️
- LLVMSwift now supports Swift 4.2 and the Swift 4.2 tooling and package manager
- `cllvm` has been internalized to LLVMSwift. The separate repository has been archived and will no longer be maintained.
- The `CallingConvention` enumeration has drastically expanded
- APIs for COMDAT support have been added
- The `IRConstant` protocol has been added, and all global values now conform to it.
- The return type of APIs that return constants have been refined to use `IRConstant` where possible
- Constant GEP, sign extension, and bitcasting APIs have been aded
- Restrictions on function attributes have been completely lifted
- Documentation for `ThreadLocalModel`s has drastically expanded and is much more accurate
- `UnnamedAddress` now supports local unnamed addresses
- Routines for adding globals have been moved from `IRBuilder` to `Module` where they belong
- `StructType` now includes accessors for its opacity and whether it was created with bitpacking or not.
- The `Size` and `Alignment` unit values have been added. Like clang's `CharUnits`, 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 `Size` and `Alignment`. Notably, `TargetData`'s functions that used to take and return integers now take and return `Size` and `Alignment`. The old forms are now deprecated
- The `StructLayout` enum has been ported from LLVM to provide convenient access to the layout of `StructType`s.
- Accessors for many more attributes of `TargetMachine` have been added.
- The `Target`s supported by a `TargetMachine` are 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!
⚠️ Breaking Changes Ahead ⚠️
LLVMSwift now requires LLVM 6.0 and Swift 4.1 to build.
In exchange, MetadataType and TokenType now have working initializers.
Support for the modern LLVM attribute API.
⚠️ Breaking Changes Ahead ⚠️
This is the last release of LLVMSwift that will fully support LLVM 5.0.
- Resolves an issue where MCJIT was not linked-into the calling process.
- Documentation fixes
- Additional constant operations to support [load-time inert references](http://duriansoftware.com/joe/Optimizing-global-constant-data-structures-using-relative-references.html)
Fix SwiftPM Versioning
6 years ago
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.