llvmlite 0.43.0rc1__cp310-cp310-win_amd64.whl → 0.44.0rc2__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of llvmlite might be problematic. Click here for more details.
- llvmlite/__init__.py +10 -3
- llvmlite/_version.py +2 -2
- llvmlite/binding/__init__.py +19 -18
- llvmlite/binding/analysis.py +69 -69
- llvmlite/binding/common.py +34 -34
- llvmlite/binding/context.py +39 -29
- llvmlite/binding/dylib.py +45 -45
- llvmlite/binding/executionengine.py +330 -330
- llvmlite/binding/ffi.py +395 -390
- llvmlite/binding/initfini.py +73 -73
- llvmlite/binding/linker.py +20 -20
- llvmlite/binding/llvmlite.dll +0 -0
- llvmlite/binding/module.py +349 -349
- llvmlite/binding/newpassmanagers.py +357 -0
- llvmlite/binding/object_file.py +82 -82
- llvmlite/binding/options.py +17 -17
- llvmlite/binding/orcjit.py +342 -342
- llvmlite/binding/passmanagers.py +946 -939
- llvmlite/binding/targets.py +520 -450
- llvmlite/binding/transforms.py +151 -151
- llvmlite/binding/typeref.py +285 -198
- llvmlite/binding/value.py +632 -618
- llvmlite/ir/__init__.py +11 -11
- llvmlite/ir/_utils.py +80 -80
- llvmlite/ir/builder.py +1120 -1119
- llvmlite/ir/context.py +20 -20
- llvmlite/ir/instructions.py +920 -893
- llvmlite/ir/module.py +246 -246
- llvmlite/ir/transforms.py +64 -64
- llvmlite/ir/types.py +734 -614
- llvmlite/ir/values.py +1217 -1217
- llvmlite/tests/__init__.py +57 -57
- llvmlite/tests/__main__.py +3 -3
- llvmlite/tests/customize.py +407 -407
- llvmlite/tests/refprune_proto.py +329 -329
- llvmlite/tests/test_binding.py +3208 -2585
- llvmlite/tests/test_ir.py +2994 -2729
- llvmlite/tests/test_refprune.py +730 -557
- llvmlite/tests/test_valuerepr.py +60 -60
- llvmlite/utils.py +29 -29
- {llvmlite-0.43.0rc1.dist-info → llvmlite-0.44.0rc2.dist-info}/LICENSE +24 -24
- {llvmlite-0.43.0rc1.dist-info → llvmlite-0.44.0rc2.dist-info}/LICENSE.thirdparty +225 -225
- {llvmlite-0.43.0rc1.dist-info → llvmlite-0.44.0rc2.dist-info}/METADATA +7 -6
- llvmlite-0.44.0rc2.dist-info/RECORD +46 -0
- {llvmlite-0.43.0rc1.dist-info → llvmlite-0.44.0rc2.dist-info}/WHEEL +1 -1
- llvmlite-0.43.0rc1.dist-info/RECORD +0 -45
- {llvmlite-0.43.0rc1.dist-info → llvmlite-0.44.0rc2.dist-info}/top_level.txt +0 -0
llvmlite/binding/initfini.py
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
from ctypes import c_uint
|
|
2
|
-
|
|
3
|
-
from llvmlite.binding import ffi
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def initialize():
|
|
7
|
-
"""
|
|
8
|
-
Initialize the LLVM core.
|
|
9
|
-
"""
|
|
10
|
-
ffi.lib.LLVMPY_InitializeCore()
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def initialize_all_targets():
|
|
14
|
-
"""
|
|
15
|
-
Initialize all targets. Necessary before targets can be looked up
|
|
16
|
-
via the :class:`Target` class.
|
|
17
|
-
"""
|
|
18
|
-
ffi.lib.LLVMPY_InitializeAllTargetInfos()
|
|
19
|
-
ffi.lib.LLVMPY_InitializeAllTargets()
|
|
20
|
-
ffi.lib.LLVMPY_InitializeAllTargetMCs()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def initialize_all_asmprinters():
|
|
24
|
-
"""
|
|
25
|
-
Initialize all code generators. Necessary before generating
|
|
26
|
-
any assembly or machine code via the :meth:`TargetMachine.emit_object`
|
|
27
|
-
and :meth:`TargetMachine.emit_assembly` methods.
|
|
28
|
-
"""
|
|
29
|
-
ffi.lib.LLVMPY_InitializeAllAsmPrinters()
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def initialize_native_target():
|
|
33
|
-
"""
|
|
34
|
-
Initialize the native (host) target. Necessary before doing any
|
|
35
|
-
code generation.
|
|
36
|
-
"""
|
|
37
|
-
ffi.lib.LLVMPY_InitializeNativeTarget()
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def initialize_native_asmprinter():
|
|
41
|
-
"""
|
|
42
|
-
Initialize the native ASM printer.
|
|
43
|
-
"""
|
|
44
|
-
ffi.lib.LLVMPY_InitializeNativeAsmPrinter()
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
def initialize_native_asmparser():
|
|
48
|
-
"""
|
|
49
|
-
Initialize the native ASM parser.
|
|
50
|
-
"""
|
|
51
|
-
ffi.lib.LLVMPY_InitializeNativeAsmParser()
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def shutdown():
|
|
55
|
-
ffi.lib.LLVMPY_Shutdown()
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
# =============================================================================
|
|
59
|
-
# Set function FFI
|
|
60
|
-
|
|
61
|
-
ffi.lib.LLVMPY_GetVersionInfo.restype = c_uint
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
def _version_info():
|
|
65
|
-
v = []
|
|
66
|
-
x = ffi.lib.LLVMPY_GetVersionInfo()
|
|
67
|
-
while x:
|
|
68
|
-
v.append(x & 0xff)
|
|
69
|
-
x >>= 8
|
|
70
|
-
return tuple(reversed(v))
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
llvm_version_info = _version_info()
|
|
1
|
+
from ctypes import c_uint
|
|
2
|
+
|
|
3
|
+
from llvmlite.binding import ffi
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def initialize():
|
|
7
|
+
"""
|
|
8
|
+
Initialize the LLVM core.
|
|
9
|
+
"""
|
|
10
|
+
ffi.lib.LLVMPY_InitializeCore()
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def initialize_all_targets():
|
|
14
|
+
"""
|
|
15
|
+
Initialize all targets. Necessary before targets can be looked up
|
|
16
|
+
via the :class:`Target` class.
|
|
17
|
+
"""
|
|
18
|
+
ffi.lib.LLVMPY_InitializeAllTargetInfos()
|
|
19
|
+
ffi.lib.LLVMPY_InitializeAllTargets()
|
|
20
|
+
ffi.lib.LLVMPY_InitializeAllTargetMCs()
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def initialize_all_asmprinters():
|
|
24
|
+
"""
|
|
25
|
+
Initialize all code generators. Necessary before generating
|
|
26
|
+
any assembly or machine code via the :meth:`TargetMachine.emit_object`
|
|
27
|
+
and :meth:`TargetMachine.emit_assembly` methods.
|
|
28
|
+
"""
|
|
29
|
+
ffi.lib.LLVMPY_InitializeAllAsmPrinters()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def initialize_native_target():
|
|
33
|
+
"""
|
|
34
|
+
Initialize the native (host) target. Necessary before doing any
|
|
35
|
+
code generation.
|
|
36
|
+
"""
|
|
37
|
+
ffi.lib.LLVMPY_InitializeNativeTarget()
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def initialize_native_asmprinter():
|
|
41
|
+
"""
|
|
42
|
+
Initialize the native ASM printer.
|
|
43
|
+
"""
|
|
44
|
+
ffi.lib.LLVMPY_InitializeNativeAsmPrinter()
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def initialize_native_asmparser():
|
|
48
|
+
"""
|
|
49
|
+
Initialize the native ASM parser.
|
|
50
|
+
"""
|
|
51
|
+
ffi.lib.LLVMPY_InitializeNativeAsmParser()
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def shutdown():
|
|
55
|
+
ffi.lib.LLVMPY_Shutdown()
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# =============================================================================
|
|
59
|
+
# Set function FFI
|
|
60
|
+
|
|
61
|
+
ffi.lib.LLVMPY_GetVersionInfo.restype = c_uint
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _version_info():
|
|
65
|
+
v = []
|
|
66
|
+
x = ffi.lib.LLVMPY_GetVersionInfo()
|
|
67
|
+
while x:
|
|
68
|
+
v.append(x & 0xff)
|
|
69
|
+
x >>= 8
|
|
70
|
+
return tuple(reversed(v))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
llvm_version_info = _version_info()
|
llvmlite/binding/linker.py
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
from ctypes import c_int, c_char_p, POINTER
|
|
2
|
-
from llvmlite.binding import ffi
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def link_modules(dst, src):
|
|
6
|
-
with ffi.OutputString() as outerr:
|
|
7
|
-
err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr)
|
|
8
|
-
# The underlying module was destroyed
|
|
9
|
-
src.detach()
|
|
10
|
-
if err:
|
|
11
|
-
raise RuntimeError(str(outerr))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ffi.lib.LLVMPY_LinkModules.argtypes = [
|
|
15
|
-
ffi.LLVMModuleRef,
|
|
16
|
-
ffi.LLVMModuleRef,
|
|
17
|
-
POINTER(c_char_p),
|
|
18
|
-
]
|
|
19
|
-
|
|
20
|
-
ffi.lib.LLVMPY_LinkModules.restype = c_int
|
|
1
|
+
from ctypes import c_int, c_char_p, POINTER
|
|
2
|
+
from llvmlite.binding import ffi
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def link_modules(dst, src):
|
|
6
|
+
with ffi.OutputString() as outerr:
|
|
7
|
+
err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr)
|
|
8
|
+
# The underlying module was destroyed
|
|
9
|
+
src.detach()
|
|
10
|
+
if err:
|
|
11
|
+
raise RuntimeError(str(outerr))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
ffi.lib.LLVMPY_LinkModules.argtypes = [
|
|
15
|
+
ffi.LLVMModuleRef,
|
|
16
|
+
ffi.LLVMModuleRef,
|
|
17
|
+
POINTER(c_char_p),
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
ffi.lib.LLVMPY_LinkModules.restype = c_int
|
llvmlite/binding/llvmlite.dll
CHANGED
|
Binary file
|