lightweight wrapper around basic LLVM functionality
Project description
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.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for llvmlite-0.29.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe2aef8ad7a9f8306802a4b826b192de63dcf5a980343966773698c37cf90da6 |
|
MD5 | 8d1a7aef326a04ca3a695ac37b22b9a2 |
|
BLAKE2b-256 | e21017af4ee132fd14fa17227a43f97930277eb72b97a189bbcec747588bfbdf |
Hashes for llvmlite-0.29.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1948dbefe77862c48dacb1f7a131ff1077fa0cc0afadd312d25d80fe6fc920ef |
|
MD5 | 7af34f28cad774d3db6913876c90dee6 |
|
BLAKE2b-256 | 40a86f66515b39053cbd62c9e0bd15e4005dc714d008dce01deac11094ea4d9a |
Hashes for llvmlite-0.29.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8f3012179f2352badaf91c9d148814f0dcefb06951b313087585f5ff80b40a7 |
|
MD5 | 15a09fe4805796bdf7ba27261edeccfa |
|
BLAKE2b-256 | 7294c1e4347ff8157de1d4064baee3820a6fbf0d374704feabe8e420a2697957 |
Hashes for llvmlite-0.29.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e02a7496f43306d359edf22770014b650291978f5ad2a7a172e187ee3fd1e3 |
|
MD5 | 4b1e69a7105c9b09b09bdcd553474422 |
|
BLAKE2b-256 | ebba760afd748fe509bca6a2b99590d46de474ec696ac286255293a5470c7e49 |
Hashes for llvmlite-0.29.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f2424dfbc1f459aab3ed0a855b8ee1e88695cf6824343a116eb21cb6dc35ca1 |
|
MD5 | 2863f493b015bd83d4c6e30bec3e50d7 |
|
BLAKE2b-256 | d7459216cdbf71b94ae8eefe24cfbdf4c1b9045a58f297c6e2eab5cb8d05faf3 |
Hashes for llvmlite-0.29.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b24b13849b56cf94b9f3fcc1b7c54a89745589da23d800ace4675242266506e |
|
MD5 | 1c0e9d3368a062fc74349c76659d17e4 |
|
BLAKE2b-256 | ce7b3f18064766f42102ac6a7982372ef95f84211959be3e7b91c2837cbb201c |
Hashes for llvmlite-0.29.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c9cb21527cff7e7e7ab17f13c335cf66fe2c219309fd6693aab6c0edaf422d0 |
|
MD5 | c60dd66d59786ca4a1670312bd2049cf |
|
BLAKE2b-256 | 8515df1d2666b88e462d641c029c09cb7e09417785f17d60f8f9e92b91d95536 |
Hashes for llvmlite-0.29.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd68e01f1444e38983a364ad1810bdaf3eb59ca1fe8aff4a33cc17a90cb9fcdb |
|
MD5 | 6dcea9ab12cff01c182099d74e2be668 |
|
BLAKE2b-256 | 09f14fa99c2079132da8694361fb9a19094616f1ba2c2eae610379e75394575f |
Hashes for llvmlite-0.29.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52886658699f70de42ec6aeba6982a1fc8fa05a69ef10b8094eaa54e883d749e |
|
MD5 | 10d496e8315e23375fe49e9762c070f9 |
|
BLAKE2b-256 | 0824752c7d1d34c7e924aeb8fb7e038a09076d0dec9bc9833c925903b68f3201 |
Hashes for llvmlite-0.29.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0f93e0e0644dfb635f258d48971827236c3a235811f179465a16040b8f21228 |
|
MD5 | f46ba4976cedba9249870474f4a6846d |
|
BLAKE2b-256 | c4750a330b7f888485f070f7d79a10d1e07234e6870c15791ecc015f73206e51 |
Hashes for llvmlite-0.29.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc8ac5f3b65cc7b50f4b777afb71b4e2896ecbbaf07657a6fc789098603e38e7 |
|
MD5 | facbf6956879354f10062817a2200381 |
|
BLAKE2b-256 | b96e63bdb84e6e00705db0d9e79ffcca4091d7077babd84203974055c3aec173 |
Hashes for llvmlite-0.29.0-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1090704f44a2f2b1b6f69ec0bcf9c7179d16917b2ab9799af9e70130420c35d |
|
MD5 | 7904d9f66c864f72515ac4b597a74aad |
|
BLAKE2b-256 | 45c7f862c958dfc8de97db0d700d3c5237865cd398cb1010259b5fc5852e264e |
Hashes for llvmlite-0.29.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b51863eb1dc5397070e37124665dd472770d685cfff24546bacf3a779a5a8c32 |
|
MD5 | d07b7d2f3d048c195cb9f88d3eb97693 |
|
BLAKE2b-256 | fc8c6412b14976f90d703279b5cd53c6f036e4e1fda434007f305e8a1e103d06 |
Hashes for llvmlite-0.29.0-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5d957dcb16756a795216515ade71433160f7485767ae14bdc429d5c9c40d624 |
|
MD5 | 34386b6f2ea3b0001c19d2d30a720cc4 |
|
BLAKE2b-256 | be6f87a83ec31df76b1084b9320d2a77f35fc349a39ae355c39dac6d584018d1 |
Hashes for llvmlite-0.29.0-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61e3f5e9a6fad63af1cb7f7d414dc4da260d315885fdc6cc252641fc911f9dec |
|
MD5 | eac811350b0d2694a545b445b43db4de |
|
BLAKE2b-256 | 06bde75f27cf3a8ca25f8401accf28b4571bc8679a51a9a341f04b9e7d333a7c |
Hashes for llvmlite-0.29.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b74a3edf542004edcf9cdb47e05ea481b33e01f633ce45ea0c68124ebf50647 |
|
MD5 | 31c4115d4c04259bd10f9d490a0bbff9 |
|
BLAKE2b-256 | 4da1a081b78433b42e070f78e2ba439843af90d070c6272718f46d0b3a6ccd64 |
Hashes for llvmlite-0.29.0-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8f7099f31e3ba8257777d179e0186a80ec7a810ae4500da8aa6254017adc7bf |
|
MD5 | f070734092543a9e51d669da54840753 |
|
BLAKE2b-256 | 22635dd4f1e36cf79b7dc1b7c2f5d60fe1c24f80da70c48a8a08ec8a849a9ed5 |
Hashes for llvmlite-0.29.0-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b4bebf5ea91a389798fe3b84436f03e014553fc156389bf810be7c7479f71d6 |
|
MD5 | b04d62b36e7cb4fee434c4c4c2505144 |
|
BLAKE2b-256 | f188f13cc89dc7fe58896a60765c5296141d4c68046b3a91cd1d6a2bae5a41ff |
Hashes for llvmlite-0.29.0-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c75225903928fcef35fdda9bfb80460f90f12c442cb85bf524f91d9874fb17d |
|
MD5 | a24d289ab201880dad2b28d9bf3ae099 |
|
BLAKE2b-256 | 12a56ad3f14a06f3f5263dcfba1bacbb285f82f03404d3879b139325ed48e277 |
Hashes for llvmlite-0.29.0-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6af0f4eaa07ac1565ecb5bc64fee8b047763cca61520e23c8ab13316058c0f06 |
|
MD5 | 33f34cace95d1d575452ff87512a4098 |
|
BLAKE2b-256 | 88569e44d7060a331cf31ef7429536852fbcb284178886deff96520ccb3f3ca8 |
Hashes for llvmlite-0.29.0-1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54ba8043c38aeff34679a4e9ea31c1cd6539bce7b221108ef0951e5480ee934b |
|
MD5 | 66128ffa6bc563abb3f61e2c8958d3c8 |
|
BLAKE2b-256 | 30aea33eb9a94734889c189ba4b05170ac0ede05904db5d3dd31158cb33ac16e |
Hashes for llvmlite-0.29.0-1-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c3d593de39ea75bb72011dfb49657677eade16eb9958865acc7773d13827424 |
|
MD5 | ac3aabace930ae587fb903ede242978d |
|
BLAKE2b-256 | 0aa9a8e1a833d04d8e38e873a97d6aa00d5c21f86732e6156b02502aa978dcc0 |
Hashes for llvmlite-0.29.0-1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 914de70f70efe016461eb0c16deb9734529575f206f0835e0035491bcbdd9422 |
|
MD5 | bd5834dad15f3f4942c96a125a1dd785 |
|
BLAKE2b-256 | 1fbfc9fc3b6d7d46968186ac37a2453639979edd8fa7199bb9f4b820a813e8c8 |
Hashes for llvmlite-0.29.0-1-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59554474a84585a3d84d5ef3ea05e24b3687c091d6839a4da7dac496164bd1ab |
|
MD5 | 7e7e6bf8fafef5c4349a05ac6c592b74 |
|
BLAKE2b-256 | e8c6cddd99fcef50063d2fcfe3c992c780ae4cb8b9f61464c429114b56d62c81 |
Hashes for llvmlite-0.29.0-1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9e01202420ffa13109370181b14e8391e1f3213bba526b2720a86d8481e2037 |
|
MD5 | 094d79abdfa61bdbd0e34a22c228452f |
|
BLAKE2b-256 | 344e7f31b4362a6e254ddb5af3035e8682cc63fa7c9d9f89b2a024adafab49b6 |
Hashes for llvmlite-0.29.0-1-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb731ca9d435df4745cd311c0bccf97034ec8535f22bff1cc866995bf56e24ec |
|
MD5 | 0ab4aaf04f1c81312ce4fdbc6cef918f |
|
BLAKE2b-256 | 9d4236f46b60c11000ed4967c3cdfa1c0adba5e8f90fb2380608dc08f25773d6 |
Hashes for llvmlite-0.29.0-1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d49e0bd0f8c6a9769260b95c455fdfb6321448948b248b57d039d5b8baaaddf5 |
|
MD5 | 096e3d625474211b3f98c2ac5ab35778 |
|
BLAKE2b-256 | f4cda330deef3e77e765f9522f3d85d6c3b71fb893a7dfc738ddac1eb3b8dabd |
Hashes for llvmlite-0.29.0-1-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e47797cd29746c121e04ddef53d6f392fb6f684d99d86812951ec09df35dd717 |
|
MD5 | f4e35aae80f26909153a19690eece088 |
|
BLAKE2b-256 | 3f9930db302f6ce7e623fa7101727a4b7cbd1b4888a770558e8662d4382aef5e |