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'
Hello and thanks for this magnificent module!
There appears to be a breaking change in
llvmlite0.45.0 that impactslleaves:Example error:
This can at the moment be solved by pinning
llvmliteto 0.44.0, but probably good to handle this in lleaves in future.