Incompatibility with llvmlite 0.45.0: AttributeError: module 'llvmlite.binding' has no attribute 'PassManagerBuilder'
Hello and thanks for this magnificent module!
There appears to be a breaking change in `llvmlite` 0.45.0 that impacts `lleaves`:
* https://github.com/numba/llvmlite/blob/main/CHANGE_LOG
* https://llvmlite.readthedocs.io/en/latest/user-guide/llvm20.html
Example error:
```
def compile_to_module(
file_path,
fblocksize=34,
finline=True,
raw_score=False,
froot_func_name="forest_root",
use_fp64=True,
):
forest = parse_to_ast(file_path)
forest.raw_score = raw_score
ir = llvmlite.ir.Module(name="forest")
gen_forest(forest, ir, fblocksize, froot_func_name, use_fp64)
ir.triple = llvm.get_process_triple()
module = llvm.parse_assembly(str(ir))
module.name = str(file_path)
module.verify()
if os.environ.get("LLEAVES_PRINT_UNOPTIMIZED_IR") == "1":
print(module)
# Create optimizer
> pmb = llvm.PassManagerBuilder()
^^^^^^^^^^^^^^^^^^^^^^^
E AttributeError: module 'llvmlite.binding' has no attribute 'PassManagerBuilder'
```
This can at the moment be solved by pinning `llvmlite` to 0.44.0, but probably good to handle this in lleaves in future.
1 条评论