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 2.7 and Python 3.4 or greater.

As of version 0.23.0, llvmlite requires LLVM 6.0. It does not support earlier or later versions of LLVM.

Historical compatibility table:

llvmlite versions

compatible LLVM versions

0.23.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.24.0.tar.gz (100.8 kB view details)

Uploaded Source

Built Distributions

llvmlite-0.24.0-cp37-cp37m-win_amd64.whl (10.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

llvmlite-0.24.0-cp37-cp37m-win32.whl (8.3 MB view details)

Uploaded CPython 3.7m Windows x86

llvmlite-0.24.0-cp37-cp37m-manylinux1_x86_64.whl (15.8 MB view details)

Uploaded CPython 3.7m

llvmlite-0.24.0-cp37-cp37m-manylinux1_i686.whl (16.1 MB view details)

Uploaded CPython 3.7m

llvmlite-0.24.0-cp37-cp37m-macosx_10_7_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.7m macOS 10.7+ x86-64

llvmlite-0.24.0-cp36-cp36m-win_amd64.whl (10.6 MB view details)

Uploaded CPython 3.6m Windows x86-64

llvmlite-0.24.0-cp36-cp36m-win32.whl (8.3 MB view details)

Uploaded CPython 3.6m Windows x86

llvmlite-0.24.0-cp36-cp36m-manylinux1_x86_64.whl (15.8 MB view details)

Uploaded CPython 3.6m

llvmlite-0.24.0-cp36-cp36m-manylinux1_i686.whl (16.1 MB view details)

Uploaded CPython 3.6m

llvmlite-0.24.0-cp36-cp36m-macosx_10_9_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

llvmlite-0.24.0-cp35-cp35m-win_amd64.whl (10.6 MB view details)

Uploaded CPython 3.5m Windows x86-64

llvmlite-0.24.0-cp35-cp35m-win32.whl (8.3 MB view details)

Uploaded CPython 3.5m Windows x86

llvmlite-0.24.0-cp35-cp35m-manylinux1_x86_64.whl (15.8 MB view details)

Uploaded CPython 3.5m

llvmlite-0.24.0-cp35-cp35m-manylinux1_i686.whl (16.1 MB view details)

Uploaded CPython 3.5m

llvmlite-0.24.0-cp35-cp35m-macosx_10_9_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.5m macOS 10.9+ x86-64

llvmlite-0.24.0-cp27-cp27mu-manylinux1_x86_64.whl (15.8 MB view details)

Uploaded CPython 2.7mu

llvmlite-0.24.0-cp27-cp27mu-manylinux1_i686.whl (16.1 MB view details)

Uploaded CPython 2.7mu

llvmlite-0.24.0-cp27-cp27m-win_amd64.whl (10.6 MB view details)

Uploaded CPython 2.7m Windows x86-64

llvmlite-0.24.0-cp27-cp27m-win32.whl (8.3 MB view details)

Uploaded CPython 2.7m Windows x86

llvmlite-0.24.0-cp27-cp27m-macosx_10_9_x86_64.whl (12.5 MB view details)

Uploaded CPython 2.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: llvmlite-0.24.0.tar.gz
  • Upload date:
  • Size: 100.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for llvmlite-0.24.0.tar.gz
Algorithm Hash digest
SHA256 320de4c4a1c105b91629305be069d217f3a9d7fbe32cb22bcfb016361895fc07
MD5 d00d7f80fbf907a4b3bb5fdcc5a65362
BLAKE2b-256 cbcefbdc55bc81b86c55577aa035c8b441ede790c5ede6df2df45855a4176cfd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 acf2c6f7728ce67002da91f8b56580b21799d235aef6643724ec22a9cb3d03f8
MD5 43ea342689067ae83f70b593a57504ad
BLAKE2b-256 ced59958e4e1bb98536f8b311616666c61bb652d9e405d0281e54a2303f2dc05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 27fb7f2335bc9f32be68f3f2b77ebb62f40764234df02e9a4fe0e725cf3ef3b1
MD5 c789a64c0a457842169087cffe2d1270
BLAKE2b-256 90cf972f445268903b0e8d1208189769d6fa6c7b811af7456bff94f5ed9db98e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0358ffed8754b706584adb7c2f8669160e631192bbd379753c39439a5fb7fc36
MD5 f438a3cbc86b8ce05605af71910d58e6
BLAKE2b-256 a6758460903124de229eeb0e313863ee669202d1f5df2d176526f8caf436f740

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 375579c3af61cface2e3ffa4ee30daed67e290efad5d8beeff3c717413382f50
MD5 d3bf4e13dd4ceb8e7c263a98178e7ec7
BLAKE2b-256 cb445817610f0769398d32756860f89f8995d80bf0148cebfe731e8ce889004f

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 809de4c7b46036c4da4c859b41b8986955d1a81d382efbfd6058a140165df4eb
MD5 3ee9ac078b6e9a0342de8e19a612e460
BLAKE2b-256 6d75ba64821b218af30ed2b09b1705fe87c98fc6fb84380f5317de1d60001d00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 95fe4be10bf2a95622cbd98d80b92e3fc2e2504ea877dca83e54594c2b33a0ab
MD5 07076254f1d305c605f0476f95b6c1e5
BLAKE2b-256 b5abe2e937e62c8be492ed1f30c5a80837b68a5d938bb88a39310d496d3cf6c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 1dc531d45a5e3938d8b7cccf48379a392b6c5353fa26e3f994805ede83e00d87
MD5 9b35e5894fea20931b73d20e6b7d7c7b
BLAKE2b-256 fed2154c3e03809c5ac5d3c4442bf5759c12fd3fbadd109ed6a954cb4146988e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 951acf91f4f263cf528b6c438ac2d9d127b171dea01cc2973866b8b61426fa2e
MD5 272ebbb8467acee609f61431e1a7d3ed
BLAKE2b-256 be05c1b933d6b3dd6a234b681605e4154c44d21ee22cbef315c4eb9d64e6ab6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 0c48be698f4303d8ff7966e41270cd392c2ef1e681ef69fb3f3fb03750285704
MD5 7f01f1e9554fdc97d8a7e6000377f21b
BLAKE2b-256 208b377671d67465b6f1b11ee452baced12dae95e2f69bcb0a31048493b5c6eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 39264af5113cf55f6fb4981dfd672a99a599d59ed38b682a95e4e8be1f256f25
MD5 fbc92948d629f586cc0429c961be3dd6
BLAKE2b-256 e7ee9e827a16b0f168b4e2da3efc8e3798fc3e4139f3196dafdf127b052c683d

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 d5f24ae1210575d832fabab04b198d11a1cff45781f5fd87301216551f43ce01
MD5 fc74bc7acca2146c128cfa7059c904f5
BLAKE2b-256 0b7b0ed27a8429d674ec82631f71d3896f23dd0caa87d5313bcb4535c58d7ab1

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 8817e023b86d840550669e35213917431ee8f16066a82ce59ad9c7f116375127
MD5 d04b83b14bcfd5284fdc64cbe47ae329
BLAKE2b-256 c39f0e958d5d61c22d11cbcd897ad60aa3de8d7cd49ca54ca086ad750e95325d

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d277d24e881d557b7b720abd76cbfec10787e447653069ac9202ff1ecf68c9bb
MD5 aa35eec2bd412377fb0e33830f4617cf
BLAKE2b-256 92fd181b9ecf9591ded90bb3022027de76fd5abea0505d4003b5c22bfb8e388c

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp35-cp35m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 ea1f94a13f6e9e6c3c6adb2edfd1158d47e85b938632e23808c9f8d35b962c8c
MD5 296e7d85aecfd32ba4a5475c069259f8
BLAKE2b-256 cfef4c32e5f0491d88da1a4a599d70d1af4119d84f3492692451a286833d1d20

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp35-cp35m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7da3e0c5d09aad2ccec32e256b37ea2d5ce557a9b98c4ec00ad80f1770db7659
MD5 d1a5edc5152ffdb03d0ddab854df160a
BLAKE2b-256 354753e4e4663f53737dca6d3ec541746207233a45ab9a66070dd68e8736e019

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3e6ba641abb4af80bb5d4a072a3510dc953218ecb5218eae9c994996c5f9c6e8
MD5 dcc50c7ea18daba76856f3de1a795be2
BLAKE2b-256 6087029b28ad25e097c525e4546530cb0212ecb7405cc024d0614af3a193ca7c

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp27-cp27mu-manylinux1_i686.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 31000d019db84976a3cd9649102ef2b4713c3c65c2f83fb7e981b196f62761e8
MD5 ae7d305d36d315a927dc04bd327bb62a
BLAKE2b-256 cb61c96873fe9fedeb96d656d9c47a72402d9f1269a7e0b3befc96d2e1a2e2c3

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 59372eb3b710e3c05936e42b8bb1d0ef3481da26e097d0a6c6a049733f3c8a99
MD5 338a9387515ec6ed0a6017daff6610ba
BLAKE2b-256 f09614495fa2d61a9f64b192b0f064914b8ed135bc3d5075d9068fa3a87411dc

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 23d31542ec7b442439e4df428fa0c12d12bec3e8ac5b3bad49f54b0d6f344c25
MD5 ebde129eda1607a791c6b991ca645832
BLAKE2b-256 37f6577f412e6c8eebdef7db9e1c57d6619804aac1f5bf87198a4113d2e885b8

See more details on using hashes here.

File details

Details for the file llvmlite-0.24.0-cp27-cp27m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for llvmlite-0.24.0-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c7f74d94349ba852704a3eba695e0086c000ae7e713fb81065eb555471d4b67c
MD5 1149007c7d8bb755c578228e5b179366
BLAKE2b-256 70d36f294bebec2c6b6821d9daf6c45f01b42fa4b33f1d5ccf1014b478664a21

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