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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

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

Uploaded CPython 3.8

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

Uploaded CPython 3.8

llvmlite-0.32.0-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.0-cp37-cp37m-win_amd64.whl (13.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.7m

llvmlite-0.32.0-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.0-cp36-cp36m-win_amd64.whl (13.6 MB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.6m

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

Uploaded CPython 3.6m

llvmlite-0.32.0-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.0.tar.gz.

File metadata

  • Download URL: llvmlite-0.32.0.tar.gz
  • Upload date:
  • Size: 104.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0.tar.gz
Algorithm Hash digest
SHA256 d65c645c32fae7b50852e80597eaef8369f826b75017d5c8d07c800e37eaed89
MD5 7ea32a64c7535e451f86a76d3fde0929
BLAKE2b-256 dc8f5c6d0e8be1585247c4fd33b84dc66d1fa6449b77d27f42a51d45242307c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-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/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2f719a26539ae84ad1e61d51158c2f5f0665b6568d16f2e22797abe6e0c34075
MD5 f80e6e205329897ac0d508c84403b546
BLAKE2b-256 9e37defbef8633a6bc692a6ed2ec5b0388f84170fa8e85498b307745eb21d0fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 35875f589a861003c2368b966bc7473b9340fb1d9a8b6e2c1015aacbf5e82d38
MD5 66b2dac8a7616e9897ed06451e610770
BLAKE2b-256 582494b23e89f90a4f2f0e665b09d83f356173324f158ff237362468043ac89d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 296af244042e94b36bb663a3c91baf8ed17d752e78a225c6692610a8aaac031b
MD5 8ecbb2b55d774404831191e97d5468ef
BLAKE2b-256 9904fb0e6a1ae6770a6a5054bad38123c9942175013160447f28588072db11a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 20.5 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 f671252984a4c4888a1a2c9c4e167ab263ed5e02efd64e0fa53f88482798647b
MD5 064fb39543e0a6895fdfe563249a25e2
BLAKE2b-256 ca3911240a0558638aa8e7f466eba02b610163dc5743ed57b0141f1710c172b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-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/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 96dfcbd83abf78947bf052e5adf051ea8fae33f1c32b53ed4d6b423aaa006d79
MD5 b51ec440b818e34700a53c891a8fa928
BLAKE2b-256 0a68f30a7cd531d0de4ac7293a933e9522ad52e31e86ca1a630390223314c2cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-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/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 d4a74ef471b5666f8d71de049663123063b286f2df04c9565ec582124f94e761
MD5 48665b555086a4a23be56f8351fd9b22
BLAKE2b-256 466c27f7a34f68c318a0a73ccfd5b5b9a72fabd548da2afb9a8b6958e6bec904

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 300905efee013788bd5e14d93c330b3ba0f76cf18bdd05ce95cba55c66b60f96
MD5 80462048761b2936247c22935f5ee620
BLAKE2b-256 d6a9ec74aa47e0bcb3cbddc40ce0d110106cf2842e8faa43974b949a9ef22e78

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1fa0f6f9229302c5d6f3cab39531c7527855c9cce47511424577232bcb67a59c
MD5 b7b2cda67b9cbfc3c0e8d32e072812bc
BLAKE2b-256 9883788c4bfd9b883dbb97788d054593e3c6e89dcacf9240b062c576370552bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 20.5 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 7308a7bf25221ad5ac1022bb3b049cd4f8fe1ba7a4ade8d4a726414ae26b1f6a
MD5 16aabf9a8bdd4a2b550d94572c506c26
BLAKE2b-256 89dc0cbb41c3669b090b888373a2f4c7a26547afe4c4a84e9ada3432b080c29d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-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/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0fe35afc4a3fdb4ba1d231c8b1ab0830a1f3e1ace8c173f9ad2fb9d15a04f4ae
MD5 f5c836c8a4aa1de24a7fb6bed575834e
BLAKE2b-256 dc9bc7cbee6b0fcd2d0c21a020bad2b4ae7d6ba7aa6a187aac517d44fa890f17

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-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/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 a224fdc0dcea84e646ef2fd7cc0861d4cd524a20aea451e626ecadd6066cef34
MD5 7c64aca318eaea6e2bf7f431ef8da753
BLAKE2b-256 89d0f1c06904c1c06a961037ad0593190b2656dc2c1d747308aca9515682e96b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 9eedfab7236b019c0b7003ded86910e1e8b29444316dec341e2165f47f7e07e3
MD5 de005354141af41c4542fb0deeea511d
BLAKE2b-256 2a382533ee832c2ed6f598d44d50c46842adcf592dc78d7c95a74ae5e793d7cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 20.2 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1b3c2f3f42a97d923211a8ecc3705cf7f7667706be55fc223fca273afc24f9fd
MD5 0673d71a6b962f6f52f9651242e44f67
BLAKE2b-256 231920c085fe98c8df8953a18d8ef15902b9be0438b7ee19586b9e9124da1a32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 20.5 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 efa16a479934651e1fecaabe488df472d9a206aa891363794c8edc0855571382
MD5 a5a690313c660947ad5b5d009bcf767a
BLAKE2b-256 c2a68a1e1cb26be474cca51362113591256a548fe88f5488f4a3eeb23cb9a3f6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llvmlite-0.32.0-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/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for llvmlite-0.32.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7a99b28c93123c662cefedc5beab6de549d4a5e6baa974f11f9c4ee21c3a34a8
MD5 b93ce89c6144185b814a4198560b79de
BLAKE2b-256 ea40f8c2b41bfc842d612f7eff3e2d84b779a795a42663084f38bf7ad85c5dbd

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