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

Uploaded Source

Built Distributions

llvmlite-0.34.0-cp38-cp38-win_amd64.whl (15.9 MB view details)

Uploaded CPython 3.8 Windows x86-64

llvmlite-0.34.0-cp38-cp38-win32.whl (12.9 MB view details)

Uploaded CPython 3.8 Windows x86

llvmlite-0.34.0-cp38-cp38-manylinux2010_x86_64.whl (24.6 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

llvmlite-0.34.0-cp38-cp38-manylinux2010_i686.whl (26.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

llvmlite-0.34.0-cp38-cp38-macosx_10_9_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

llvmlite-0.34.0-cp37-cp37m-win_amd64.whl (15.9 MB view details)

Uploaded CPython 3.7m Windows x86-64

llvmlite-0.34.0-cp37-cp37m-win32.whl (12.9 MB view details)

Uploaded CPython 3.7m Windows x86

llvmlite-0.34.0-cp37-cp37m-manylinux2010_x86_64.whl (24.6 MB view details)

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

llvmlite-0.34.0-cp37-cp37m-manylinux2010_i686.whl (26.7 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

llvmlite-0.34.0-cp37-cp37m-macosx_10_9_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

llvmlite-0.34.0-cp36-cp36m-win_amd64.whl (15.9 MB view details)

Uploaded CPython 3.6m Windows x86-64

llvmlite-0.34.0-cp36-cp36m-win32.whl (12.9 MB view details)

Uploaded CPython 3.6m Windows x86

llvmlite-0.34.0-cp36-cp36m-manylinux2010_x86_64.whl (24.6 MB view details)

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

llvmlite-0.34.0-cp36-cp36m-manylinux2010_i686.whl (26.7 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

llvmlite-0.34.0-cp36-cp36m-macosx_10_9_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: llvmlite-0.34.0.tar.gz
  • Upload date:
  • Size: 107.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1.post20200810 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for llvmlite-0.34.0.tar.gz
Algorithm Hash digest
SHA256 f03ee0d19bca8f2fe922bb424a909d05c28411983b0c2bc58b020032a0d11f63
MD5 278cdd723ba6a807b526bc25b97a0874
BLAKE2b-256 0b9607bfa93a103fb9e3e9ae7f9f7c6687ae714aee66b6f3000da3fad71e0aa2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 15.9 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.34.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 964f8f7a2184963cb3617d057c2382575953e488b7bb061b632ee014cfef110a
MD5 98fd153f5fa567f203b7a941e373c84a
BLAKE2b-256 4c1addac06185923111e6d48d579b4829a644c6fbdef0b830f95d53ce27df21c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 12.9 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.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.34.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 28264f9e2b3df4135cbcfca5a91c5b0b31dd3fc02fa623b4bb13327f0cd4fc80
MD5 688b40c3c13fcbbc42bb8013a647380e
BLAKE2b-256 680a5b7e2d0d0a934aafe43ac1c3a6284da55215b62254eda476b95cf7a47ad1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 24.6 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ 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.34.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 05253f3f44fab0148276335b2c1b2c4a78143dfa78e6bafd7f937d6248f297cc
MD5 de3690c335a13cce35cae3a2d734eced
BLAKE2b-256 2bf8104e35345995e2ca35acff0aa429cab79677344fd54cd025eecebd0b01b1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp38-cp38-manylinux2010_i686.whl
  • Upload date:
  • Size: 26.7 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ i686
  • 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.34.0-cp38-cp38-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 8f344102745fceba6eb5bf03c228bb290e9bc79157e9506a4a72878d636f9b3c
MD5 4de6b14f6a3f20e7d0d793f81ead36f5
BLAKE2b-256 384022bf3f2c2496b544288398a81fd9f55359606fc9ba44b2bf2a1e02ae22de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 18.4 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.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.34.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 132322bc084abf336c80dd106f9357978c8c085911fb656898d3be0d9ff057ea
MD5 745c10bd360b9b5139470923eaa2d396
BLAKE2b-256 d098d92305aa1f514b9a59883bb12dbe0859e6d1547ffe606755405042b65a00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 15.9 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.34.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 5d1f370bf150db7239204f09cf6a0603292ea28bac984e69b167e16fe160d803
MD5 3b6230aea1ec70f240af97e7e746a283
BLAKE2b-256 c5a3c4963b9b8bafba8cb7c266a6436e514b3a08bd300e31621ccbec7f1a8708

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 12.9 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.34.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 408b15ffec30696406e821c89da010f1bb1eb0aa572be4561c98eb2536d610ab
MD5 0c7bc7ae20806b1925ba7f1e6aeff67f
BLAKE2b-256 cf8da698cc9a76ba7b4a0c6ef7e9fa349548d87b46938037c8aac99169849171

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 24.6 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ 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.34.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d841248d1c630426c93e3eb3f8c45bca0dab77c09faeb7553b1a500220e362ce
MD5 093db6dc4b521cf538da73bffd84bdda
BLAKE2b-256 4bdf88c6d62e39947c5b1f2b1eb2239d1aa3013d6a61a75730f8b8997b6e66c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp37-cp37m-manylinux2010_i686.whl
  • Upload date:
  • Size: 26.7 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ i686
  • 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.34.0-cp37-cp37m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 6d3f81992f52a94077e7b9b16497029daf5b5eebb2cce56f3c8345bbc9c6308e
MD5 7f4eaee2fd57857a92594308c293e469
BLAKE2b-256 f6f780d93e610f27549adff84b081a577aea43513cd43b87fded21665c8814e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 18.4 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.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.34.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bb96989bc57a1ccb131e7a0e061d07b68139b6f81a98912345d53d9239e231e1
MD5 bb6822c681eebbdd6e4c48e3d22297e0
BLAKE2b-256 371c18ab3765b1c60981ed636e7f851c660c3d808f0d3a5870a215f1c74176b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 15.9 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.34.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 5acdc3c3c7ea0ef7a1a6b442272e05d695bc8492e5b07666135ed1cfbf4ab9d2
MD5 b6686519f654d4d91ee9e0ec94aef0fa
BLAKE2b-256 b8b0f69cb0dc1cff13e6b75ea1190577d590d8d8e2bd3fe803ac45235d4b1ec8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 12.9 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.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.34.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 9ff1dcdad03be0cf953aca5fc8cffdca25ccee2ec9e8ec7e95571722cdc02d55
MD5 df6e47991ed5d23a420bcfc804e124e1
BLAKE2b-256 76a481c31edd1304909c77058dc35fa964c5a89d1c87aa55f07d59dbce056497

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 24.6 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ 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.34.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e08d9d2dc5a31636bfc6b516d2d7daba95632afa3419eb8730dc76a7951e9558
MD5 7c22fda0b01bf96f6dbc39f03abf7da9
BLAKE2b-256 f3b78a91b513f165e0affdeb975c1fef307c39d1051ce71e8aec1da9dcb317ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp36-cp36m-manylinux2010_i686.whl
  • Upload date:
  • Size: 26.7 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ i686
  • 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.34.0-cp36-cp36m-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 5bdf0ce430adfaf938ced5844d12f80616eb8321b5b9edfc45ef84ada5c5242c
MD5 4dd14282305646b15dd150b839f9178e
BLAKE2b-256 a076403c94e21c3c0f23b0a9fe1441a9190948f8937b341a65aa830d9e4cd9b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.34.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 18.4 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.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.34.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 11342e5ac320c953590bdd9d0dec8c52f4b5252c4c6335ba25f1e7b9f91f9325
MD5 b98c64f3a3e22e4da6260e345a9429be
BLAKE2b-256 22e06a2af71fcbc4e269964c7b1ed92a8c80e71367dc0f4e12dd35139c0c6925

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