llvm-hs-pure is a set of pure Haskell types and functions for interacting with LLVM http://llvm.org/. It includes an ADT to represent LLVM IR (http://llvm.org/docs/LangRef.html). The llvm-hs package builds on this one with FFI bindings to LLVM, but llvm-hs-pure does not require LLVM to be available.
- Track type definitions in
MonadModuleBuilder. This allows us to automatically resolve
gepinstructions. Note that type definitions must be defined before they are used (i.e.
MonadFixwill not behave correctly here).
- Change the type of
IRBuilderAPI to require a
- Change the type of
IRBuilderAPI to return a
NamedTypeReferenceto the newly defined type.
- Update for LLVM 7.0:
DISubrangeto use the new
DICounttype instead of an
checksumfield of type
- Rename the
- Fix type of
shuffleVectorin the IRBuilder API.
- Remove field prefixes from
DISubroutineTypeto make the API consistent with the other debug metadata types.
- Change the type of the scope fields in
Maybe (MDRef DIScope)to reflect that they can be optional.
- IRBuilder: Ensure that automatically generated block labels are
assigned smaller identifiers than the instructions following
them. This is only important when you use
llvm-hsdoes not care about the order of identifiers assigned to unnamed values.
- IRBuilder: add
currentBlockwhich returns name of the currently active block.
- Remove the
MetadataNodeReferenceconstructor. References to metadata nodes are now encoded using the polymorphic
- Add debug metadata to the AST in
LLVM.AST.Operand. Thanks to @xldenis who started that effort!
- Drop support for GHC 7.10.
- Support for LLVM 6.0
NoFastMathFlagsconstructor since it is equivalent to setting all fields in the
False. Existing uses of
NoFastMathFlagscan be replaced by the
AggregateZerofor zero-initializing structs, arrays and vectors. Previously
Nullwas used for null pointers as well as zero-inializing aggregates. The new behavior reflects LLVM’s internal representation and the C++-API. Existing uses of
Nullon non-pointer types must be changed to
- Fix recursive function calls in the
- Fixes and enhancements to the IRBuilder
udivno longer default to exact.
- Fix type of global references.
- Add more instructions.
- Add a completely new API for building modules in a monadic style similar to the IRBuilder provided by LLVM’s C++ API. The modules can be found in
LLVM.IRBuilder. An example can be found in the readme and in the test suite.
- Add an API for getting the type of LLVM values in
LLVM.AST.Typed. This is primarily intended to be used in other libraries that build upon
- Suport string attributes as parameter attributes
- Support more calling conventions
Support for LLVM 5.0
We only give a summary of the changes affecting the public API of
llvm-hs-purehere. Please refer to the official release notes for LLVM 5.0 for an overview of all changes in LLVM 5.0.
X86_64_Win64calling convention is now called
- There is a new
CrossThreadsynchronization scope has been removed. There is now a new
- Switch AST to
ShortByteStringreflecting LLVM’s use of C-style strings.
preferredAlignmentis now a
Maybe Word32. To recover the old behavior set it to the same value as abiAlignment.
GlobalAliasnow expects the element type of a pointer type instead of the pointer type itself. The address space is passed separately via the
addrSpacefield. This makes
FloatingPointTypeconstructor now takes a
FloatingPointTypeargument instead of a width and a
FloatingPointFormatto more closely match the LLVM IR language reference.
Namenow throws an error on non-ASCII strings instead of silently discarding the upper bytes. There is also a new
mkNamefunction with the same behavior for easier discoverability. Non-ASCII names need to be encoded using an arbitrary encoding to to a
ShortByteStringwhich can then be used as a
4.0.0 (initial release, changes in comparison to llvm-general)
- Move modules from
- Support for LLVM 4.0
- Improved support for LLVM’s exception handling instructions
-fshared-llvmis now supported on windows (thanks to @RyanGLScott)
- Default to