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.

Files changed (47) hide show
  1. llvmlite/__init__.py +10 -3
  2. llvmlite/_version.py +2 -2
  3. llvmlite/binding/__init__.py +19 -18
  4. llvmlite/binding/analysis.py +69 -69
  5. llvmlite/binding/common.py +34 -34
  6. llvmlite/binding/context.py +39 -29
  7. llvmlite/binding/dylib.py +45 -45
  8. llvmlite/binding/executionengine.py +330 -330
  9. llvmlite/binding/ffi.py +395 -390
  10. llvmlite/binding/initfini.py +73 -73
  11. llvmlite/binding/linker.py +20 -20
  12. llvmlite/binding/llvmlite.dll +0 -0
  13. llvmlite/binding/module.py +349 -349
  14. llvmlite/binding/newpassmanagers.py +357 -0
  15. llvmlite/binding/object_file.py +82 -82
  16. llvmlite/binding/options.py +17 -17
  17. llvmlite/binding/orcjit.py +342 -342
  18. llvmlite/binding/passmanagers.py +946 -939
  19. llvmlite/binding/targets.py +520 -450
  20. llvmlite/binding/transforms.py +151 -151
  21. llvmlite/binding/typeref.py +285 -198
  22. llvmlite/binding/value.py +632 -618
  23. llvmlite/ir/__init__.py +11 -11
  24. llvmlite/ir/_utils.py +80 -80
  25. llvmlite/ir/builder.py +1120 -1119
  26. llvmlite/ir/context.py +20 -20
  27. llvmlite/ir/instructions.py +920 -893
  28. llvmlite/ir/module.py +246 -246
  29. llvmlite/ir/transforms.py +64 -64
  30. llvmlite/ir/types.py +734 -614
  31. llvmlite/ir/values.py +1217 -1217
  32. llvmlite/tests/__init__.py +57 -57
  33. llvmlite/tests/__main__.py +3 -3
  34. llvmlite/tests/customize.py +407 -407
  35. llvmlite/tests/refprune_proto.py +329 -329
  36. llvmlite/tests/test_binding.py +3208 -2585
  37. llvmlite/tests/test_ir.py +2994 -2729
  38. llvmlite/tests/test_refprune.py +730 -557
  39. llvmlite/tests/test_valuerepr.py +60 -60
  40. llvmlite/utils.py +29 -29
  41. {llvmlite-0.43.0rc1.dist-info → llvmlite-0.44.0rc2.dist-info}/LICENSE +24 -24
  42. {llvmlite-0.43.0rc1.dist-info → llvmlite-0.44.0rc2.dist-info}/LICENSE.thirdparty +225 -225
  43. {llvmlite-0.43.0rc1.dist-info → llvmlite-0.44.0rc2.dist-info}/METADATA +7 -6
  44. llvmlite-0.44.0rc2.dist-info/RECORD +46 -0
  45. {llvmlite-0.43.0rc1.dist-info → llvmlite-0.44.0rc2.dist-info}/WHEEL +1 -1
  46. llvmlite-0.43.0rc1.dist-info/RECORD +0 -45
  47. {llvmlite-0.43.0rc1.dist-info → llvmlite-0.44.0rc2.dist-info}/top_level.txt +0 -0
@@ -1,60 +1,60 @@
1
- import math
2
- import sys
3
- import unittest
4
-
5
- from llvmlite.ir import (
6
- Constant, FloatType, DoubleType, LiteralStructType, IntType,
7
- ArrayType, HalfType)
8
- from llvmlite.tests import TestCase
9
-
10
-
11
- int8 = IntType(8)
12
- int16 = IntType(16)
13
-
14
-
15
- PY36_OR_LATER = sys.version_info[:2] >= (3, 6)
16
-
17
-
18
- class TestValueRepr(TestCase):
19
-
20
- def test_double_repr(self):
21
- def check_repr(val, expected):
22
- c = Constant(DoubleType(), val)
23
- self.assertEqual(str(c), expected)
24
- check_repr(math.pi, "double 0x400921fb54442d18")
25
- check_repr(float('inf'), "double 0x7ff0000000000000")
26
- check_repr(float('-inf'), "double 0xfff0000000000000")
27
-
28
- def test_float_repr(self):
29
- def check_repr(val, expected):
30
- c = Constant(FloatType(), val)
31
- self.assertEqual(str(c), expected)
32
- check_repr(math.pi, "float 0x400921fb60000000")
33
- check_repr(float('inf'), "float 0x7ff0000000000000")
34
- check_repr(float('-inf'), "float 0xfff0000000000000")
35
-
36
- @unittest.skipUnless(PY36_OR_LATER, 'py36+ only')
37
- def test_half_repr(self):
38
- def check_repr(val, expected):
39
- c = Constant(HalfType(), val)
40
- self.assertEqual(str(c), expected)
41
- check_repr(math.pi, "half 0x4009200000000000")
42
- check_repr(float('inf'), "half 0x7ff0000000000000")
43
- check_repr(float('-inf'), "half 0xfff0000000000000")
44
-
45
- def test_struct_repr(self):
46
- tp = LiteralStructType([int8, int16])
47
- c = Constant(tp, (Constant(int8, 100), Constant(int16, 1000)))
48
- self.assertEqual(str(c), "{i8, i16} {i8 100, i16 1000}")
49
-
50
- def test_array_repr(self):
51
- tp = ArrayType(int8, 3)
52
- values = [Constant(int8, x) for x in (5, 10, -15)]
53
- c = Constant(tp, values)
54
- self.assertEqual(str(c), "[3 x i8] [i8 5, i8 10, i8 -15]")
55
- c = Constant(tp, bytearray(b"\x01\x02\x03"))
56
- self.assertEqual(str(c), '[3 x i8] c"\\01\\02\\03"')
57
-
58
-
59
- if __name__ == "__main__":
60
- unittest.main()
1
+ import math
2
+ import sys
3
+ import unittest
4
+
5
+ from llvmlite.ir import (
6
+ Constant, FloatType, DoubleType, LiteralStructType, IntType,
7
+ ArrayType, HalfType)
8
+ from llvmlite.tests import TestCase
9
+
10
+
11
+ int8 = IntType(8)
12
+ int16 = IntType(16)
13
+
14
+
15
+ PY36_OR_LATER = sys.version_info[:2] >= (3, 6)
16
+
17
+
18
+ class TestValueRepr(TestCase):
19
+
20
+ def test_double_repr(self):
21
+ def check_repr(val, expected):
22
+ c = Constant(DoubleType(), val)
23
+ self.assertEqual(str(c), expected)
24
+ check_repr(math.pi, "double 0x400921fb54442d18")
25
+ check_repr(float('inf'), "double 0x7ff0000000000000")
26
+ check_repr(float('-inf'), "double 0xfff0000000000000")
27
+
28
+ def test_float_repr(self):
29
+ def check_repr(val, expected):
30
+ c = Constant(FloatType(), val)
31
+ self.assertEqual(str(c), expected)
32
+ check_repr(math.pi, "float 0x400921fb60000000")
33
+ check_repr(float('inf'), "float 0x7ff0000000000000")
34
+ check_repr(float('-inf'), "float 0xfff0000000000000")
35
+
36
+ @unittest.skipUnless(PY36_OR_LATER, 'py36+ only')
37
+ def test_half_repr(self):
38
+ def check_repr(val, expected):
39
+ c = Constant(HalfType(), val)
40
+ self.assertEqual(str(c), expected)
41
+ check_repr(math.pi, "half 0x4009200000000000")
42
+ check_repr(float('inf'), "half 0x7ff0000000000000")
43
+ check_repr(float('-inf'), "half 0xfff0000000000000")
44
+
45
+ def test_struct_repr(self):
46
+ tp = LiteralStructType([int8, int16])
47
+ c = Constant(tp, (Constant(int8, 100), Constant(int16, 1000)))
48
+ self.assertEqual(str(c), "{i8, i16} {i8 100, i16 1000}")
49
+
50
+ def test_array_repr(self):
51
+ tp = ArrayType(int8, 3)
52
+ values = [Constant(int8, x) for x in (5, 10, -15)]
53
+ c = Constant(tp, values)
54
+ self.assertEqual(str(c), "[3 x i8] [i8 5, i8 10, i8 -15]")
55
+ c = Constant(tp, bytearray(b"\x01\x02\x03"))
56
+ self.assertEqual(str(c), '[3 x i8] c"\\01\\02\\03"')
57
+
58
+
59
+ if __name__ == "__main__":
60
+ unittest.main()
llvmlite/utils.py CHANGED
@@ -1,29 +1,29 @@
1
- import os
2
- import sys
3
-
4
-
5
- # This module must be importable without loading the binding, to avoid
6
- # bootstrapping issues in setup.py.
7
-
8
- def get_library_name():
9
- """
10
- Return the name of the llvmlite shared library file.
11
- """
12
- if os.name == 'posix':
13
- if sys.platform == 'darwin':
14
- return 'libllvmlite.dylib'
15
- else:
16
- return 'libllvmlite.so'
17
- else:
18
- assert os.name == 'nt'
19
- return 'llvmlite.dll'
20
-
21
-
22
- def get_library_files():
23
- """
24
- Return the names of shared library files needed for this platform.
25
- """
26
- files = [get_library_name()]
27
- if os.name == 'nt':
28
- files.extend(['msvcr120.dll', 'msvcp120.dll'])
29
- return files
1
+ import os
2
+ import sys
3
+
4
+
5
+ # This module must be importable without loading the binding, to avoid
6
+ # bootstrapping issues in setup.py.
7
+
8
+ def get_library_name():
9
+ """
10
+ Return the name of the llvmlite shared library file.
11
+ """
12
+ if os.name == 'posix':
13
+ if sys.platform == 'darwin':
14
+ return 'libllvmlite.dylib'
15
+ else:
16
+ return 'libllvmlite.so'
17
+ else:
18
+ assert os.name == 'nt'
19
+ return 'llvmlite.dll'
20
+
21
+
22
+ def get_library_files():
23
+ """
24
+ Return the names of shared library files needed for this platform.
25
+ """
26
+ files = [get_library_name()]
27
+ if os.name == 'nt':
28
+ files.extend(['msvcr120.dll', 'msvcp120.dll'])
29
+ return files
@@ -1,24 +1,24 @@
1
- Copyright (c) 2014-, Continuum Analytics, Inc.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions are
6
- met:
7
-
8
- Redistributions of source code must retain the above copyright notice,
9
- this list of conditions and the following disclaimer.
10
-
11
- Redistributions in binary form must reproduce the above copyright
12
- notice, this list of conditions and the following disclaimer in the
13
- documentation and/or other materials provided with the distribution.
14
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18
- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1
+ Copyright (c) 2014-, Continuum Analytics, Inc.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are
6
+ met:
7
+
8
+ Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+
11
+ Redistributions in binary form must reproduce the above copyright
12
+ notice, this list of conditions and the following disclaimer in the
13
+ documentation and/or other materials provided with the distribution.
14
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.