numba / llvmlite

A lightweight LLVM python binding for writing JIT compilers
https://llvmlite.pydata.org/
BSD 2-Clause "Simplified" License
1.92k stars 316 forks source link

Convert from `llvmlite.binding.ModuleRef` to `llvmlite.ir.Module` #746

Open xrkk opened 3 years ago

xrkk commented 3 years ago

Is it possible to convert llvmlite.bingding.ModuleRef parsed from bitcode to llvmlite.ir.Module? So that I can check whether instruction is Load by isinstance(insn, LoadInstr).

What I need is detailed parsing of existing llvm bitcode, instead of creating new bitcode files.

Thank.

gmarkall commented 3 years ago

There's no support for parsing existing bitcode at present. I'll label this as a feature request, though I note that it's a non-trivial amount of work to implement.