llvmlite, how resolve ConstantExpr?
See original GitHub issueI have instruction like below. and i get it by ‘llvmlite.binding.parse_assembly’ and that instruction represented by llvmlite.binding.ValueRef
store i8* getelementptr inbounds (i8, i8* bitcast (i32 ()* @main to i8*), i64 107), i8** %1, align 8
# this print
# store i8* getelementptr inbounds (i8, i8* bitcast (i32 ()* @main to i8*), i64 107), i8** %1, align 8
print(instruction)
# Error Log ' raise ValueError('expected block value, got %s' % (self._kind,)) '
for operand in instruction.operands:
operand.operands
There are any way to get ConstantExpr operands? or get from ll file?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Installation — llvmlite 0.40.0dev0-48-ged0f625-dirty ...
Numba is the compiler package, this depends on llvmlite. ... llvm-lto-static.patch : Fix issue with LTO shared library on Windows.
Read more >llvm::ConstantExpr Class Reference
A constant value that is initialized with an expression using other constant values. This class uses the standard Instruction opcodes to define the...
Read more >llvmlite Documentation - Read the Docs
These functions tell LLVM how to resolve external symbols referred from compiled LLVM code. • llvmlite.binding.add_symbol(name, address).
Read more >目录 - Gitee
More strange since happens if LLVM (via llvmlite) is loaded after a fork. ... numba#2707: Fix regression: cuda test submodules not loading properly...
Read more >llvmlite failed to install. Error building llvmlite - Stack Overflow
Go to here and download llvmlite package for your python version, e.g. llvmlite‑0.35.0‑cp39‑cp39‑win_amd64.whl for Python 3.9.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

As a pointer for where to start looking, if you want to try to augment llvmlite to provide the information you’re looking for: the functionality for getting the functions, instructions, operands, etc. is implemented in ffi/value.cpp and llvmlite/binding/value.py (in the
ValueRefclass) - you could add additional functions that provide access to other LLVM functions (such asGetElementPtrInst.getPointerOperandfor example, if that’s what you’re looking for) to these files by taking inspiration from the functions that already exist there.llvmpy is very old and unsupported as far as I know - I would suggest that using it wouldn’t be easy or sustainable.
Thanks kind programmers