Displaying 7 results from an estimated 7 matches for "llvmcpy".
2017 Jan 12
2
llvmcpy: yet another Python binding for LLVM
...asses, properties and the like.
I've quickly tested it with LLVM 3.4, 3.8 and 3.9, and, for its
simplicity, does a good job. It also supports multiple LLVM
installations (it uses the one of the first llvm-config in path).
I'd be happy to have some feedback, give it a look:
https://rev.ng/llvmcpy
--
Alessandro Di Federico
PhD student at Politecnico di Milano
[1] http://www.llvmpy.org/
[2] https://github.com/numba/llvmlite
[3] https://github.com/numba/llvmlite/issues/157
[4] http://cffi.readthedocs.io/en/latest/
2018 Jan 01
0
Is there a python binding, or any other script binding, that has access to individual instructions?
...Yuri via llvm-dev wrote:
> I was thinking to make a simple code analysis tool to, for example,
> find all system calls that have unchecked return codes, but I can't
> find a binding for any scripting language. And I am averse to writing
> this in C++.
One possible choice would be llvmcpy -- Python bindings used by the
rev.ng (https://rev.ng/) project:
https://github.com/revng/llvmcpy
Here's an example showing syscalls invocations tracing:
https://github.com/revng/revamb/blob/master/docs/PythonExample.rst#tracing-all-the-syscall-invocations
Best,
Matt
2018 Jan 01
5
Is there a python binding, or any other script binding, that has access to individual instructions?
There is llvmlite http://llvmlite.readthedocs.io/en/latest/ , but it
doesn't seem to support reading individual instructions, based on these
docs.
I was thinking to make a simple code analysis tool to, for example, find
all system calls that have unchecked return codes, but I can't find a
binding for any scripting language. And I am averse to writing this in C++.
Thanks,
Yuri
2017 Oct 31
2
A query language for LLVM IR (XPath)
...> /* ... */
>
> I'm not releasing the full code yet since it's very much work in
> progress, but if anyone is interested in such a thing, just ping me.
> The applications could range from using it in existing code to just
> provide it for fast prototyping, e.g., in llvmcpy [3].
>
> Obviously there are some open questions, such as how to deal with
> operands, which could lead to an infinite tree, or how to organize
> attributes. But it should be doable.
>
> ---
> Alessandro Di Federico
> PhD student at Politecnico di Milano
>
> [1] htt...
2017 Oct 29
2
A query language for LLVM IR (XPath)
...t>("/*/*/store"))
/* ... */
I'm not releasing the full code yet since it's very much work in
progress, but if anyone is interested in such a thing, just ping me.
The applications could range from using it in existing code to just
provide it for fast prototyping, e.g., in llvmcpy [3].
Obviously there are some open questions, such as how to deal with
operands, which could lead to an infinite tree, or how to organize
attributes. But it should be doable.
---
Alessandro Di Federico
PhD student at Politecnico di Milano
[1] https://en.wikipedia.org/wiki/XPath
[2] https://pugix...
2018 Apr 04
0
Fault while using AAResultsWrapperPass in LLVM 5.0.1
I am trying to use AliasAnalysis. The code for pass dependence is as following:
class Timer : public ModulePass{
AliasAnalysis *AA;
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<AAResultsWrapperPass>();
}
.........
}
bool Timer::runOnFunction(Function &F)
{
LLVMContext &C = F.getContext();
AA =
2018 Feb 07
0
C to LLVM IR in python
Hi,
I am currently trying to convert C to LLVM IR in python. Till now, I have
achieved the task by calling clang in python, but I would like to find
something that can allow me to take a file in python and turn it to LLVM
IR. I looked at some tools online, such as pycparser and llvmcpy, but it
seems like the tool ends at generating the AST but not the IR. Can anyone
suggest other tools that I can use ? And if you succeed in using the
aforementioned tools to generate IR, can you share such insights with me?
Thanks!
Brenda
-------------- next part --------------
An HTML attachment...