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.33.0, llvmlite requires LLVM 9.0.x.

Historical compatibility table:

llvmlite versions

compatible LLVM versions

0.33.0 - …

9.0.x

0.29.0 - 0.32.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.33.0.tar.gz (104.6 kB view details)

Uploaded Source

Built Distributions

llvmlite-0.33.0-cp38-cp38-win_amd64.whl (15.0 MB view details)

Uploaded CPython 3.8 Windows x86-64

llvmlite-0.33.0-cp38-cp38-win32.whl (12.1 MB view details)

Uploaded CPython 3.8 Windows x86

llvmlite-0.33.0-cp38-cp38-manylinux1_x86_64.whl (18.3 MB view details)

Uploaded CPython 3.8

llvmlite-0.33.0-cp38-cp38-manylinux1_i686.whl (18.7 MB view details)

Uploaded CPython 3.8

llvmlite-0.33.0-cp38-cp38-macosx_10_9_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

llvmlite-0.33.0-cp37-cp37m-win_amd64.whl (15.0 MB view details)

Uploaded CPython 3.7m Windows x86-64

llvmlite-0.33.0-cp37-cp37m-win32.whl (12.1 MB view details)

Uploaded CPython 3.7m Windows x86

llvmlite-0.33.0-cp37-cp37m-manylinux1_x86_64.whl (18.3 MB view details)

Uploaded CPython 3.7m

llvmlite-0.33.0-cp37-cp37m-manylinux1_i686.whl (18.7 MB view details)

Uploaded CPython 3.7m

llvmlite-0.33.0-cp37-cp37m-macosx_10_9_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

llvmlite-0.33.0-cp36-cp36m-win_amd64.whl (15.0 MB view details)

Uploaded CPython 3.6m Windows x86-64

llvmlite-0.33.0-cp36-cp36m-win32.whl (12.1 MB view details)

Uploaded CPython 3.6m Windows x86

llvmlite-0.33.0-cp36-cp36m-manylinux1_x86_64.whl (18.3 MB view details)

Uploaded CPython 3.6m

llvmlite-0.33.0-cp36-cp36m-manylinux1_i686.whl (18.7 MB view details)

Uploaded CPython 3.6m

llvmlite-0.33.0-cp36-cp36m-macosx_10_9_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: llvmlite-0.33.0.tar.gz
  • Upload date:
  • Size: 104.6 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.33.0.tar.gz
Algorithm Hash digest
SHA256 9c8aae96f7fba10d9ac864b443d1e8c7ee4765c31569a2b201b3d0b67d8fc596
MD5 08004f9ebe56e8842cd1c21b1a447045
BLAKE2b-256 714eb1086722f4fa0b52cf8c0d4b2c985fb3f95d2f1be1b010259497b2464c1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 15.0 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.33.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5d4f8433df3bdb5e008b9766aa6de5854f5c5b29314037d301c92ca12bfb7f1a
MD5 aaf603dfd300e3e4940eabd24d82721c
BLAKE2b-256 1648dfa7810dc97aa015e7dbf063888e532b5e48072c00988fa643e6a89f05d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 12.1 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.33.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 5f181a0aae3367787291cdfd07b703ddbb8b08f394fad64d555db7ea217d0f24
MD5 245445429b3af7ac95f712f70f6cfbd9
BLAKE2b-256 e36bbe453f995143ecd613449380bc02252efb2c0c6cb614f6d79913f2829998

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 18.3 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.33.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 89b9458b1e1c9b3adb48695ba1bf266dffc7cb381265839113eda5a6102e731d
MD5 006c1a5871141b4105df9728f224b66b
BLAKE2b-256 83f2534dfe1f042b71495afa01806b2b954bd35a7a3f363f3e4a31e7cec84868

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 18.7 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.33.0-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 b9ffc8a7c44f1726330ad8a6bc97272728212ef0667105259c26396e94a76fbd
MD5 e3efa3abb9714ba34364529973ab2b0f
BLAKE2b-256 4e78fe344f701aab619306d721e39407e835e2d3b3549d46d6d6d07c97a96eec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 17.3 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.33.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 37b0da8df72d575d57e930efdd8e257c72bb9ceb722403483349fbdb5cadb726
MD5 8d9fbc3c43d8c9cb42c62929ff75e8dc
BLAKE2b-256 fab9bfb7f590bb5873a77c9b87eaa26848a64979a4023cfce75f45a8df527063

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 15.0 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.33.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 f74e8ae96cb82622f17cad04048f8565a906377d61df31bcb7c82038144aded1
MD5 d0dfbbe8321aaa026818e433109acf8d
BLAKE2b-256 5c1e0844f91499004b3510878f10e9c7cafc7d34a89bd74a3667974d91745bf0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 12.1 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.33.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 53981cde265b2dd489b0efccd2e456ac72b849d46a91a4b6f89b0267488edece
MD5 bee27c1e9dfa4daa95015011baa5974c
BLAKE2b-256 2532de27cc67ef205f4bb08a1838638e09c525f911d28c6550ae51fc1dad3070

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 18.3 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.33.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4eeb747c5c8acb7bafb42ae7a69cf95ed21b26d54e7165bc8468f9e9c8a1ed5e
MD5 32e5aede69227cc64df4dcd1d1dcab97
BLAKE2b-256 0a280a35b3c2685bf2ea327cef5577bdf91f387f0f4594417a2a05a1d42fb7c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 18.7 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.33.0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 2e83ca852d002d768523251719865223eae693bdf012720eccd0af95aee798b5
MD5 c99e2a8cf539bcc951b33f1e3dda31e6
BLAKE2b-256 556a5aba6eada41b55e2b2954e56e456c7ec9b587fc77f0b879f85fdbf82d30b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 17.3 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.33.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cc4b5564c644ba438cf2616de4731766d093199299d9c7573f6fe8aa5b2c07c3
MD5 e1559c8a53172396da170b372d7bddfa
BLAKE2b-256 29afdc2ebe6c08c796952e9db690691e9952945df2a72d58f0936330923832e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 15.0 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.33.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 c5a09728fb98336dd3d0f96aafadb2e3b4ccc3214804f71a02afb9ae40cfcd91
MD5 ec2e8d1f362f114993902f17cb41f5f7
BLAKE2b-256 ed4e594c2284f673d0f8660caf7df9af8d54953bd8f80ec502005ec0209ff41b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 12.1 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.33.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 c2b71b560555b9ddbdb50425bbecfb1df2d5153c1b0db47e2d23286deb1c3753
MD5 e864b678a514e9f9c534dddd9c2c6204
BLAKE2b-256 6e5016dba38bca7694566434268816fb42bf73d6c46bf623dcc21d2dcabf1835

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 18.3 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.33.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ff7145e263cccb82e93ec88b30e55b7705ce40cde3bd86de26e83e22734b0632
MD5 110294146ecb75b26f76164b169781c9
BLAKE2b-256 d53710d2c4ba0c131cf112d0a8fc97af7a77ca4a769aff626b2bfa2e57e679cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 18.7 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.33.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 03f5557f9e52bbaeca60a2e89ae71ca907e2f19a03f75fea73d9d5bbf619654e
MD5 8ee88af0a0daf0369e3e721668e1f615
BLAKE2b-256 af3390a42eb689e2267af0a9a2a75d90ef0f2a15e55a6e19f8f56d50e5cfb0f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.33.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 17.3 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.33.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1a31702cc1383893a4c3d8103226207399848aaa4d16633051d0a25d78cfc726
MD5 475cbbf82b642ae0ecdf719eeab33262
BLAKE2b-256 f53a2075e151e2eeb346e82caf074e661fa0694d404f28e3a06aa7c4132f883a

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