Skip to main content

lightweight wrapper around basic LLVM functionality

Project description

Travis CI Code Climate Coveralls.io Readthedocs.io

A lightweight LLVM python binding for writing JIT compilers

The old llvmpy binding exposes a lot of LLVM APIs but the mapping of C++-style memory management to Python is error prone. Numba and many JIT compilers do not need a full LLVM API. Only the IR builder, optimizer, and JIT compiler APIs are necessary.

llvmlite is a project originally tailored for Numba’s needs, using the following approach:

  • A small C wrapper around the parts of the LLVM C++ API we need that are not already exposed by the LLVM C API.

  • A ctypes Python wrapper around the C API.

  • A pure Python implementation of the subset of the LLVM IR builder that we need for Numba.

Key Benefits

  • The IR builder is pure Python code and decoupled from LLVM’s frequently-changing C++ APIs.

  • Materializing a LLVM module calls LLVM’s IR parser which provides better error messages than step-by-step IR building through the C++ API (no more segfaults or process aborts).

  • Most of llvmlite uses the LLVM C API which is small but very stable (low maintenance when changing LLVM version).

  • The binding is not a Python C-extension, but a plain DLL accessed using ctypes (no need to wrestle with Python’s compiler requirements and C++ 11 compatibility).

  • The Python binding layer has sane memory management.

  • llvmlite is quite faster than llvmpy’s thanks to a much simpler architeture (the Numba test suite is twice faster than it was).

llvmpy Compatibility Layer

The llvmlite.llvmpy namespace provides a minimal llvmpy compatibility layer.

Compatibility

llvmlite works with Python 3.6 and greater.

As of version 0.29.0, llvmlite requires LLVM 7.0.x or later

Historical compatibility table:

llvmlite versions

compatible LLVM versions

0.29.0 - …

7.0.x, 7.1.x, 8.0.x

0.27.0 - 0.28.0

7.0.x

0.23.0 - 0.26.0

6.0.x

0.21.0 - 0.22.0

5.0.x

0.17.0 - 0.20.0

4.0.x

0.16.0 - 0.17.0

3.9.x

0.13.0 - 0.15.0

3.8.x

0.9.0 - 0.12.1

3.7.x

0.6.0 - 0.8.0

3.6.x

0.1.0 - 0.5.1

3.5.x

Documentation

You’ll find the documentation at http://llvmlite.pydata.org

Pre-built binaries

We recommend you use the binaries provided by the Numba team for the Conda package manager. You can find them in Numba’s anaconda.org channel. For example:

$ conda install --channel=numba llvmlite

(or, simply, the official llvmlite package provided in the Anaconda distribution)

Other build methods

If you don’t want to use our pre-built packages, you can compile and install llvmlite yourself. The documentation will teach you how: http://llvmlite.pydata.org/en/latest/install/index.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llvmlite-0.32.1.tar.gz (104.3 kB view details)

Uploaded Source

Built Distributions

llvmlite-0.32.1-cp38-cp38-win_amd64.whl (13.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

llvmlite-0.32.1-cp38-cp38-win32.whl (10.6 MB view details)

Uploaded CPython 3.8 Windows x86

llvmlite-0.32.1-cp38-cp38-manylinux1_x86_64.whl (20.2 MB view details)

Uploaded CPython 3.8

llvmlite-0.32.1-cp38-cp38-manylinux1_i686.whl (20.5 MB view details)

Uploaded CPython 3.8

llvmlite-0.32.1-cp38-cp38-macosx_10_9_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

llvmlite-0.32.1-cp37-cp37m-win_amd64.whl (13.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

llvmlite-0.32.1-cp37-cp37m-win32.whl (10.6 MB view details)

Uploaded CPython 3.7m Windows x86

llvmlite-0.32.1-cp37-cp37m-manylinux1_x86_64.whl (20.2 MB view details)

Uploaded CPython 3.7m

llvmlite-0.32.1-cp37-cp37m-manylinux1_i686.whl (20.5 MB view details)

Uploaded CPython 3.7m

llvmlite-0.32.1-cp37-cp37m-macosx_10_9_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

llvmlite-0.32.1-cp36-cp36m-win_amd64.whl (13.6 MB view details)

Uploaded CPython 3.6m Windows x86-64

llvmlite-0.32.1-cp36-cp36m-win32.whl (10.6 MB view details)

Uploaded CPython 3.6m Windows x86

llvmlite-0.32.1-cp36-cp36m-manylinux1_x86_64.whl (20.2 MB view details)

Uploaded CPython 3.6m

llvmlite-0.32.1-cp36-cp36m-manylinux1_i686.whl (20.5 MB view details)

Uploaded CPython 3.6m

llvmlite-0.32.1-cp36-cp36m-macosx_10_9_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file llvmlite-0.32.1.tar.gz.

File metadata

  • Download URL: llvmlite-0.32.1.tar.gz
  • Upload date:
  • Size: 104.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1.tar.gz
Algorithm Hash digest
SHA256 41262a47b8cbba5a09203b15b65fbdf11192f92aa226c81e99115acdee8f3b8d
MD5 6a24a248cb801c04bf0ae4b7c7a5f022
BLAKE2b-256 50cc04526507e80d546be5688ce0246e40277b61e7949c3347c6609b6a4154cf

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 13.6 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 24bae99cca872ae7792d3a92a9a98bbd99dc667687ef1787424f79a5e88e703f
MD5 13bb8aaf8e285835ed0ff07882e1c341
BLAKE2b-256 51d87a4a1edc39c2752560aad1840b26ca69381f5aecae368e3065b75fefa229

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp38-cp38-win32.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp38-cp38-win32.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 e8a50067a7f62cc2fbff230e8b35b18d709e55849ab57d8da56f45487224b27e
MD5 515eed568c737a1fbdeb438f3e105c86
BLAKE2b-256 17aae862f27826cf2a944061e511b6ca79d9d31b37dec8c22c750e26d9341dcd

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7a739c86a4cb57d8cfde086a33e13145a4d58c84991a4f8d3b8cd966bcfe4748
MD5 380dbb224ac82c28d488762676883189
BLAKE2b-256 0637cf04f4deb2a259b8a54f12445cf79238e6d365f7026429dd972bc9856da9

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp38-cp38-manylinux1_i686.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 20.5 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 a914e2ac2e83442f0d2a23530aed2a8dcdad52170b864554bc29af36f44a9c3f
MD5 504d75a0a3f2c6fa86eb1f4930aa5d89
BLAKE2b-256 b5b0955494b8ea13f2e4b7d5b45f524ea9c9f16b8e599c1be3d075906eebc7ea

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 15.9 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 60d2bf71606a3be77ca1fcfac8c359ebb760b1a83c1822f650f2c1fd1e49f982
MD5 9132c20d177073d747551142e52a244e
BLAKE2b-256 77e12132ca2aa21ec9bc02d7996f26e9074091ba8694b38f7e387550bf0ee52c

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 13.6 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 35d31e7f3195fac6c7c3eaccdeab07c14b66e5f82612d9ddcea67943a6c618dc
MD5 ef8a8db1cff6dc47ed8a2765748faeac
BLAKE2b-256 8c0d616bfaf3830280b20f85db8e5deac2aac23153592a042796a8815b3a94e6

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp37-cp37m-win32.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 f8f9c437f3b0308d27d089f4e3e039327f803b1c29f383f63d69093f519e9f64
MD5 e6fdb7ac80505565ae1e0214da1708ad
BLAKE2b-256 f6d01c6b57569e378f28f8ffc7930a851f08ee6140d844e75f195937b9cec5cf

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6f63ee20976deed2126468f02959fedd66060740f8d723665816c6ff35eca28c
MD5 552e7a79f9ae45b05249a96e6f91a65f
BLAKE2b-256 c14ce9554f393c60018ff89dcc87f7ff30866c97f81482bec64e62d81685612f

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 20.5 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 45dfb187d4c26e00be061742fc0c541f196495edc663b163f1b8fbeb695709c3
MD5 bda66a4a60df48801104ae5c61311ac1
BLAKE2b-256 ca573efcd49ec67708d315e58080263d2059db063b3a7be846b5c84908ab118a

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 15.9 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 297e32bb0987fca4888c9d518bf3ee2c89a385bc3466d6ee8c1f2ef75182fc76
MD5 5dfcb5587422b5ded6bad9745d32eb35
BLAKE2b-256 0c838dd472cca2d2733813078aeb601b99674c559b2d032dfa34e2599b77ba57

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 13.6 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 811c9bc7ba4a8c11f9d6925ea3aba9259786e89f4cecd93b6915e5f5cb5aec40
MD5 a8f1fad5732c257a761fd3b80cf65561
BLAKE2b-256 3b9717244e4656ed8f0e1a64386d2f193062b59daa9a82aff314b61d6a5abe2c

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp36-cp36m-win32.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 37bc22d119ade63ac0f8706d507b41f0802fc9ca48203de49455041c0b73c900
MD5 d8a2230b4a3fb3919ef306efe622cab1
BLAKE2b-256 48e9693b6f555ea03f132c136ec410ed194e12be4f7d7b5a775d4fb0609c349c

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 56883969d54d42b14f797c7f9cfe3acf224c9919d027e633470ad8e8d12a18ce
MD5 17d353ef6ab2ce10097ff751aa61ab24
BLAKE2b-256 1cfdd029b53b19200a2b98bed69ba0354b37c236b44a93b34b3075c4aaab2d03

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 20.5 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 fb0b94d5d3db37049956e113789af330d382b4c7df31288a763de283a2d5e72a
MD5 c73dc3f9e5d4cd030bedb648063cab7a
BLAKE2b-256 aee2999fa885de07258e7210a661b339f37d20c6d0faa67c6c5c2c490aab914b

See more details on using hashes here.

File details

Details for the file llvmlite-0.32.1-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: llvmlite-0.32.1-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 15.9 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for llvmlite-0.32.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a1598c7ce5077ae557a1cb3a82bff46edd3068293d83ba3634fd10e210c5bba7
MD5 d9844592b3fd30c08e0ff020b281afcb
BLAKE2b-256 56a540d54ad7451ac56d2c15274371cdd2cfeaace7c36e1ff25fd9cb833f66bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page