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.34.0, llvmlite requires LLVM 10.0.x. on all architectures except aarch64 which requires LLVM 9.0.x due to: https://bugs.llvm.org/show_bug.cgi?id=46996

Historical compatibility table:

llvmlite versions

compatible LLVM versions

0.34.0 - …

10.0.x (9.0.x for aarch64 only)

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.35.0.tar.gz (121.2 kB view details)

Uploaded Source

Built Distributions

llvmlite-0.35.0-cp38-cp38-win_amd64.whl (16.0 MB view details)

Uploaded CPython 3.8 Windows x86-64

llvmlite-0.35.0-cp38-cp38-win32.whl (13.0 MB view details)

Uploaded CPython 3.8 Windows x86

llvmlite-0.35.0-cp38-cp38-manylinux2010_x86_64.whl (25.3 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

llvmlite-0.35.0-cp38-cp38-manylinux2010_i686.whl (27.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

llvmlite-0.35.0-cp38-cp38-macosx_10_9_x86_64.whl (18.5 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

llvmlite-0.35.0-cp37-cp37m-win_amd64.whl (16.0 MB view details)

Uploaded CPython 3.7m Windows x86-64

llvmlite-0.35.0-cp37-cp37m-win32.whl (13.0 MB view details)

Uploaded CPython 3.7m Windows x86

llvmlite-0.35.0-cp37-cp37m-manylinux2010_x86_64.whl (25.3 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

llvmlite-0.35.0-cp37-cp37m-manylinux2010_i686.whl (27.4 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

llvmlite-0.35.0-cp37-cp37m-macosx_10_9_x86_64.whl (18.5 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

llvmlite-0.35.0-cp36-cp36m-win_amd64.whl (16.0 MB view details)

Uploaded CPython 3.6m Windows x86-64

llvmlite-0.35.0-cp36-cp36m-win32.whl (13.0 MB view details)

Uploaded CPython 3.6m Windows x86

llvmlite-0.35.0-cp36-cp36m-manylinux2010_x86_64.whl (25.3 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

llvmlite-0.35.0-cp36-cp36m-manylinux2010_i686.whl (27.4 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

llvmlite-0.35.0-cp36-cp36m-macosx_10_9_x86_64.whl (18.5 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: llvmlite-0.35.0.tar.gz
  • Upload date:
  • Size: 121.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0.tar.gz
Algorithm Hash digest
SHA256 80e51d5aa02ad72da9870e89d21f9b152b0220ca551b4596a6c0614bcde336fc
MD5 944b8c6c33f5767149dace37d2146d6f
BLAKE2b-256 cd3e631087324bd3ffaf9a9c1c9d7d6675863e41afb31c818dd700019193e6b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.35.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 16.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.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.5

File hashes

Hashes for llvmlite-0.35.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d99059da5630d4c38b155ef0cccd34932a8d16e2c5d18b29ec6d6ec06ef3c8b7
MD5 f4e796d81672094f5f4008b7037bb9e9
BLAKE2b-256 ffb9e0c7bf9c90fb635f9c5dadaa17c90f1b2522ae7897350637bc7221e3f442

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.35.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 13.0 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 d5fcb329c3a8c69f280b57f91833f8a939e6688eebd4614cf6d3e04424ef3330
MD5 a8411a673d365d598a4c739647362d3e
BLAKE2b-256 15d5b2641cac5b81705067f6c810fc4b377f2981e9b49bf88c86c5572c82a7e9

See more details on using hashes here.

File details

Details for the file llvmlite-0.35.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: llvmlite-0.35.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 25.3 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4d1ed8d1d20cf57fdfff8560740283c28f44b2dd6c3749e4677c3e19b914da0a
MD5 b4c870c8cb7954babd2db7a194100998
BLAKE2b-256 6782b9f88fa8b620630ea9e9bea673f1c625c495f69e7a480a363eef7770f5ef

See more details on using hashes here.

File details

Details for the file llvmlite-0.35.0-cp38-cp38-manylinux2010_i686.whl.

File metadata

  • Download URL: llvmlite-0.35.0-cp38-cp38-manylinux2010_i686.whl
  • Upload date:
  • Size: 27.4 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp38-cp38-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 733c8a191fa8294abb4f6a699306339b19afce84c6fc29646b5c40be92fdee41
MD5 634f98744f6fc06ff914f9d00d9161c7
BLAKE2b-256 dc7e53208d06ab13deee0faf3a5886acca24b638a4f416901276ab31cf6ac3d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.35.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 18.5 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9166ed996df3e345409bd4d98bae58e0b5e85eb2f4c32b186ff5c9ae93448da5
MD5 ba1c29181a358c646ce9d629f89f0cdf
BLAKE2b-256 6d231006a2dc1f9f969a3837402d18f23670f550e2ef14a614e8b8fc96127f3e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.35.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 16.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.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.5

File hashes

Hashes for llvmlite-0.35.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8381b5530b4064a913e0bf1fb5cdd714ddd1834e0496a9343c905be5683e013a
MD5 bcb6ae390d2fdf2a84a630be364d1563
BLAKE2b-256 54461abf8a9cefed0647283d4e9500976512fa925b5302d397c1f018528e6f1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.35.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 13.0 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.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.5

File hashes

Hashes for llvmlite-0.35.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 aa844f9c0961799530915b45545c287bec1970399da27629a8d9e762ab55de9f
MD5 7c5371414fa706eadaffef6edf05ad44
BLAKE2b-256 0774f055717ae8abc20dfb6a6b6dc69463f544bab116ad5704685f6ecf17e45d

See more details on using hashes here.

File details

Details for the file llvmlite-0.35.0-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: llvmlite-0.35.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 25.3 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f36f1ee5905c5e91254376db7df9163aa7793cfd79220a98ef3c9b59895f0008
MD5 82664b5d18b9af8323e47366e51dcfa7
BLAKE2b-256 d09e3b6283c1c074bedc96df7741b04d3c2def90dc7f4e99442e127676c953ec

See more details on using hashes here.

File details

Details for the file llvmlite-0.35.0-cp37-cp37m-manylinux2010_i686.whl.

File metadata

  • Download URL: llvmlite-0.35.0-cp37-cp37m-manylinux2010_i686.whl
  • Upload date:
  • Size: 27.4 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 822975d3ad2861d163ce7b1474e32e6ca7c6a6e76143c461ffc43aedfb610857
MD5 51061dbdf344582a6ff8cae4b3d4e7e4
BLAKE2b-256 4f5d023b0874bea20ccbf9b8bd6f907af5ebfdc9f48a88708309fad9d5ff838f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.35.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 18.5 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4b510150a5cba35f3014ce7614c4b4d2b8a5aeeebe930693825711d66c8f127f
MD5 89f0f62ede22239e4f45ef2acd4e779a
BLAKE2b-256 01e1c38abe0ed214019fda56ab4c0a74fa66916def225753e9adcbf8b6850fb9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.35.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 16.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.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.5

File hashes

Hashes for llvmlite-0.35.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 75120207100c87ecf0a4bf297cd7da2ff04bf2a97aecfa2d327723f83e457779
MD5 88522bd8acbda4202f53456d2b0d1fa9
BLAKE2b-256 727726fc5ef8c53141475eb9d428813b3862a19fc9bcc77a5f928e5b192f60a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.35.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 13.0 MB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 c541226f3ceb5bd311ef4786ad0ccfff2ed10fa601b4788b7fe8164c16719ba0
MD5 631a0bf65aaa5678bc0b84720b9f27ab
BLAKE2b-256 80d02a8a0a50b2fe96e65f84dd0a626294e5b83d96a0e175351dbae0123986bf

See more details on using hashes here.

File details

Details for the file llvmlite-0.35.0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: llvmlite-0.35.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 25.3 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 10f444ab648fb4b0ca266d0dcd201892aa8051db11f5dc98dc79631fc6bbf528
MD5 40540a8e231913cd5d5f9f3d5bef8173
BLAKE2b-256 9f94f05040ee3ec199c827a38426d78d0af9274c1e18ec9a592bb40954c952c8

See more details on using hashes here.

File details

Details for the file llvmlite-0.35.0-cp36-cp36m-manylinux2010_i686.whl.

File metadata

  • Download URL: llvmlite-0.35.0-cp36-cp36m-manylinux2010_i686.whl
  • Upload date:
  • Size: 27.4 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 6365f3bd781512506761e081ae88722f7acdd389ae486512d3612cdbbaf1b3f4
MD5 262e809a90bb849b36673bcfcaa1ab4f
BLAKE2b-256 5cb80c1542fada3cad9d6a3cfc78fc69d6f88d27d5b58edd24a36515cd463dd0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.35.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 18.5 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.6

File hashes

Hashes for llvmlite-0.35.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6383bf98f71c0ccafb20ed1fc560127c26b8db9a2f3aeb09d2be4ae26c3d2674
MD5 cb07d2d7addfa3a36cc432e26f5f81be
BLAKE2b-256 840609488c0bef4776a4750c5c579b4f0f5ec5ffdfdb6cf8afe1b6aa8f48aed6

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